Semi-automated Python formatting.
Project description
Tuck
Semi-automated Python formatting.
The aim of this tool is to build up developer-assistance tooling for python formatting. In general it will only format things when it needs to or when directly instructed to.
Usage
Most usage of Tuck is expected to be within editor extensions:
Tuck can be also used as a command line tool:
python -m tuck --positions <line>:<col> -- file.py
Style
The wrapped statement style which Tuck targets aims to reduce diff noise without concern for vertical space.
Example: Function definition
def foo(bar: str, quox: int = 0) -> float:
return 4.2
wraps to:
def foo(
bar: str,
quox: int = 0,
) -> float:
return 4.2
Example: List comprehension
[x for x in 'aBcD' if x.isupper()]
wraps to:
[
x
for x in 'aBcD'
if x.isupper()
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tuck-0.2.4.tar.gz
(16.8 kB
view details)
Built Distribution
tuck-0.2.4-py2.py3-none-any.whl
(18.2 kB
view details)
File details
Details for the file tuck-0.2.4.tar.gz
.
File metadata
- Download URL: tuck-0.2.4.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd5ee76fd5dc6c0efc0fe403ca39f1ebaeca4029443444123ec3233c9b85cd63 |
|
MD5 | 171bc4f2de10ff397504d992e610e513 |
|
BLAKE2b-256 | 7e8377167c2386152edc0dc282b308910f12a9ef88babbbdb8e4a9652a5a4ed3 |
File details
Details for the file tuck-0.2.4-py2.py3-none-any.whl
.
File metadata
- Download URL: tuck-0.2.4-py2.py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2d989c7886717c9b38089691bd28d951444f75ae744f396c3221f11cda6b9c3 |
|
MD5 | 02b67692f7cf2256d8b1dbff8ae9b35c |
|
BLAKE2b-256 | 07666e8c664dd35bc27b7c45008db2be9a74f2f7f4efa45781a6b00d9f0ffd6a |