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

Uploaded Source

Built Distribution

tuck-0.0.6-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for tuck-0.0.6.tar.gz
Algorithm Hash digest
SHA256 54f5f63eb016e9a71bed9aa541488847d7330351773f8109105e8f3bc22dcb39
MD5 9ce19aedfa95e187752ec6b27ae367bd
BLAKE2b-256 a672fd9235379ac3b49ef7a1c90a5475cddd882da1fd0d60a7a233b92f4d0a30

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.0.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.7 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/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.9

File hashes

Hashes for tuck-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e3fed6699fbfde70d302a0b1fb15602fdef82f2b8efa7be854442ae482906d5c
MD5 c6b8b85652159893913cc76a3fe325c8
BLAKE2b-256 461cbf2db8df24f0efbdde803452d2dcc762a4feb923f1e4691b4d13b9f83b4b

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