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) -> List[str]:
    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.9.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

tuck-0.0.9-py2.py3-none-any.whl (11.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.0.9.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.9

File hashes

Hashes for tuck-0.0.9.tar.gz
Algorithm Hash digest
SHA256 a7f636aa39e2816f37d6e09aa9858160d6e995b66ea435e323559b5df698a9ed
MD5 c26aaacf916d074c33e4ce515f203927
BLAKE2b-256 5beb50d3ef873009fc9b5aa16d6f29e706084aa4fa6d0f59ace2f16ff7036c4c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.9

File hashes

Hashes for tuck-0.0.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 41aed771d5a675b1e4b0870214f4ab062dceae3b218104b37d7298cffa60eb67
MD5 903711c767756054d892a24c5cca7cc4
BLAKE2b-256 ab7b38b035786e5c324af0ef4bf3111a84efe08f798ef693943c6faf79bb149a

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