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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 c1aee51f0a8478b6780a2acd11bab3d62dc06674a9bba0ebbbe2b47449da24a7
MD5 0ea26094d68c90ff334e885e3b688567
BLAKE2b-256 19c74e744d991131a8f3bd1d7c5c370a3224bfc86c0382a65bb52713ebd6e090

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.2.0-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.1 CPython/3.9.15

File hashes

Hashes for tuck-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c18166a1a042d8ace1f2177bed7d6b2442ccf26aa54605b3e45f0554c9f341b6
MD5 5c546175a312c7cce8fce866dbc83254
BLAKE2b-256 46b07ca0ea71d5fca6856988b21ba715413b90fd18bbbb12d8f43cbd4724c235

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