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()
]
Development
Setup with:
pip install -r script/requirements-dev.txt -e .
Run validations with:
./script/check
Release files for tuck 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tuck-0.2.5.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tuck-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.7 kB
Release files / tuck-0.2.5.tar.gz
| Download URL | tuck-0.2.5.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
857b0a26c5a6e9a4f606f08d927ec4034342d4153939826f2d2bf06989d086bb
|
|
BLAKE2b-256 checksum How to use checksums |
f3444e567600248f88e276042091d2f0b65c993fb974fca3d295dcf6d3e9567c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / tuck-0.2.5-py3-none-any.whl
| Download URL | tuck-0.2.5-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e829755fe4cda4346c6fc5a4a606903c5d0b273388e4257b473bd7cf327bc9a
|
|
BLAKE2b-256 checksum How to use checksums |
0287aa7af87d83a1ffd97afd06b7de8bb3a430a2eb32a67195ef56798998dc6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|