Skip to main content

Semi-automated Python formatting.

Project description

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()
]

Project details


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.2.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

tuck-0.2.2-py2.py3-none-any.whl (18.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file tuck-0.2.2.tar.gz.

File metadata

  • Download URL: tuck-0.2.2.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

Hashes for tuck-0.2.2.tar.gz
Algorithm Hash digest
SHA256 576b06fb013ccc1a53fddf52dfa784db15e63ede90863141d152fca0ccd1e1ef
MD5 5a3b7fb030ac2f113b9c0bb59c9911ce
BLAKE2b-256 0c477904cc77f20275ad4d4dcaadad01fa9610c6ed8480640d3865074c2771ea

See more details on using hashes here.

Provenance

File details

Details for the file tuck-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: tuck-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for tuck-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 13d8e4e5c04f642e0b65b13cb14cf7c4c1ccf948463657afd5ab57c08580b88a
MD5 3d2758cd7a1b6ff5ff7a052d299f12e9
BLAKE2b-256 7c017180130db058f8d35dc078e336fb2af566b7a086d2962088fdb599558040

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page