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) -> List[str]:
    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.8.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

tuck-0.0.8-py2.py3-none-any.whl (10.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.0.8.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.9

File hashes

Hashes for tuck-0.0.8.tar.gz
Algorithm Hash digest
SHA256 b0774cd4da63e0421fb0b375bd4140420ab5205b6f272f7b27fba5895ae587d8
MD5 0f6eabe666cddf984c534eeeb3a00029
BLAKE2b-256 b75a9fefa5652f815f23e61ef4f38ba4034b787941cd259bd43076e92c4f60ce

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.9

File hashes

Hashes for tuck-0.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a55b60438a3ee5ab90559eae5d99162f7202edceca234024aaacc3da732fb8dd
MD5 843b1bbe7c51184f04f38400a56b1220
BLAKE2b-256 04e105281e21e34f4cebc0ad6339cba56392067c1c696c872b1f0eacf7379c91

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