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

Uploaded Source

Built Distribution

tuck-0.0.7-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.0.7.tar.gz
  • Upload date:
  • Size: 8.8 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.7.tar.gz
Algorithm Hash digest
SHA256 47fd0f5bd900b34d96a9a45b2d9d41ead298d922b5e0c916a2b8334460234e99
MD5 fc81efc14575348a0bd95bfbb2b0e26d
BLAKE2b-256 08159fe3ca2df7b24f48889399482b810754a68d03c84b3579cc661d260d5ea9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.4 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.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fa751f4b967f5e242b38f1f6a66394020d69a61c7b88ddb8c0c6410fbdcfe0b8
MD5 a8f80f87c95559a25db17b98d0b78027
BLAKE2b-256 80c900b68c98c8fc4e63750e10502828e0bd076688ea713d3d90b6646d6260d5

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