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

Uploaded Source

Built Distribution

tuck-0.1.2-py2.py3-none-any.whl (16.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.1.2.tar.gz
  • Upload date:
  • Size: 10.2 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.60.0 CPython/3.5.10

File hashes

Hashes for tuck-0.1.2.tar.gz
Algorithm Hash digest
SHA256 75d26f58385ca7f37fbfeb21eab9dd4e0a3f89f50d1076b3b1e289d5328b2f2d
MD5 40fdb99a50d8ab6eb6f71c56579609dc
BLAKE2b-256 2a1301522c5f0dda5bed040cc8c16bb3638e6f799eed5349b68e3b67131c8e9f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.3 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.60.0 CPython/3.5.10

File hashes

Hashes for tuck-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 50df6d481039a8899e507b3238a75d88edde7fb77c679903749ac9164c4fdb48
MD5 48875be87f985f1a94381433ae15f484
BLAKE2b-256 eae93c0a2249c6ced74de6facac7b4525f649ea5106902f12a84c0299ae3fa9f

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