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

Uploaded Source

Built Distribution

tuck-0.0.10-py2.py3-none-any.whl (11.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for tuck-0.0.10.tar.gz
Algorithm Hash digest
SHA256 bfe1221da7d163fd440cc2b0d04eb8ee5ca185242513b6f4b8bda81fca60fb5b
MD5 713222201ae051d39908cc201e1650a7
BLAKE2b-256 73a67ca191cbf6a5578e9c50064304658510595942ad6844f007d495927b8647

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.9 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/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.9

File hashes

Hashes for tuck-0.0.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2a57ba8d0cc1f346c8ed7119836e209b6246d0de1c36bf083a0e45a16ee3a898
MD5 0332e5b06eca540748e08f4c6b7eed48
BLAKE2b-256 337fbb444b30c4394df1f2029e497dd71391e002f775e569351006c8f3640a3d

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