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

Uploaded Source

Built Distribution

tuck-0.1.5-py2.py3-none-any.whl (18.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.1.5.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for tuck-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d5a1b468df9200d3c5c6d68525296a0fedc2ab01067bcf674979735d73c07a0f
MD5 aac4edfc98c08fa0d3240dd082449fe7
BLAKE2b-256 f6f906893dd9e99aba5742edde8585b16b2983510769938ea552ded0d6017bfb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.1.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for tuck-0.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5e66bd86978f7bf618e7d445cf212d452d6f9b8873825890a724cbef578c2ff0
MD5 32f498e68022d5afa1c4f0c1321de8b8
BLAKE2b-256 94630c9bf4d8b31728c5da17d1c13db4f3878665fbc441344b9171f171bcde2c

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