Skip to main content

Tuck

CircleCI

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)

Source distribution for tuck 0.2.5
File Size Uploaded
tuck-0.2.5.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tuck 0.2.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page