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

Uploaded Source

Built Distribution

tuck-0.1.0-py2.py3-none-any.whl (16.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for tuck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0115a1455bc7ae45f4adbe0cc5b3a87e097d154dff001ac38994403eaf6e65eb
MD5 8835b83e92c7a01717ead2f264f2470a
BLAKE2b-256 c14dac7ec54f3d5bfa2ce12f38d60dbe37ae12453deb74b3b7a1219cab64c2f5

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for tuck-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f9ec12bc6f5df190c8018615edcc109208c6cc71191c43672fbc7c4d22e96a7c
MD5 f506dde416fdbfa09a1e986c217ce675
BLAKE2b-256 69bffff22a8b48e23e81d660827aac063c002f8598015188a021343d63a4ec01

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