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

Uploaded Source

Built Distribution

tuck-0.0.11-py2.py3-none-any.whl (12.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.0.11.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.5.10

File hashes

Hashes for tuck-0.0.11.tar.gz
Algorithm Hash digest
SHA256 0d12a473c64c795b5a1138450eb3f8bdc8c42c33c59960b9b8f46610b229032b
MD5 17d49da26e92fd14bfe740b0122555eb
BLAKE2b-256 53942f9c8b096779bf3aef7711007eca6e9232ca75bcb72a7d0a937a4077341a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.5.10

File hashes

Hashes for tuck-0.0.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 47ecfab81d0a7762cad6f33a825cb7f404fb87196f93108c2ba0f8e1c61d36af
MD5 3ebd46b864b1b399a096253a9be0552d
BLAKE2b-256 6dc9b978dae274c92122e4b3c3e18963032e3e7ce94141b8eadd9d43b0d0d29b

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