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 hashes)
Built Distribution
tuck-0.2.4-py2.py3-none-any.whl
(18.2 kB
view hashes)