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

Uploaded Source

Built Distribution

tuck-0.0.12-py2.py3-none-any.whl (12.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.0.12.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.5.10

File hashes

Hashes for tuck-0.0.12.tar.gz
Algorithm Hash digest
SHA256 21bae64365f7d0eb0acd15b3b7ba4c8e167a44507c8eb0890e7f60a5e9e1738a
MD5 b690a3af7610ef276c4bdc1c118fdbbd
BLAKE2b-256 b28e4fb1bc2e77f2441abe41569b206e056668b1b87ae0d4394882e279f1caf2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.12-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.5.10

File hashes

Hashes for tuck-0.0.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 747681d0989d336affa46ac352810a02f72ff52e9c5751e596f64b67f2156fb1
MD5 bdc05e86fc7ce8a511205a763a353e10
BLAKE2b-256 a1b0e05861b2e7949f91128658fdb4b14147277fb9c1ec015ba5b7e9234713ee

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