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

Uploaded Source

Built Distribution

tuck-0.1.3-py2.py3-none-any.whl (16.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: tuck-0.1.3.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for tuck-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a785327da9f6fb2f35fca0dc9b54fb8a2a09b40dfd42531931152cf98194ac58
MD5 5356378544a86b688f24f81e05bb574f
BLAKE2b-256 0c38b01d476750c2f6f38d1987a17ece314c96d33e9ecdf9596ccee748079317

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tuck-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for tuck-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eb27319f1bf6395e42b2e5920693e5aee62d8001c0cc9e741fad6e6db117eb0f
MD5 73c5b54d238ebbcb4665ad5d7f3abf75
BLAKE2b-256 cea7cfc739dc8e8d7ac20dbabf98b04df2d347397c9f30c53183793814398bef

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