Skip to main content

Automatically Sort __all__ records alphabetically

Project description

Sort __all__ lists alphabetically

Usage

Install the package, e.g. pip install sort-all <path-to-file>

Run the tool: sort-all

Command line options

Options:

usage: sort-all [-h] [--check] [--no-error-on-fix] [filenames ...]

Sort __all__ records alphabetically.

positional arguments:
  filenames          Files to process

options:
  -h, --help         show this help message and exit
  --check            check the file for unsorted / unformatted imports and print them to the command line without modifying the file; return 0
                  when nothing would change and return 1 when the file would be reformatted.
  --no-error-on-fix  return 0 even if errors are occurred during processing files

Usage with pre-commit

sort-all can be used as a hook for pre-commit.

To add sort-all as a plugin, add this repo definition to your configuration:

repos:
- repo: https://github.com/aio-libs/sort-all
  rev: ...  # select the tag or revision you want, or run `pre-commit autoupdate`
  hooks:
  - id: sort-all

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

sort_all-1.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

sort_all-1.3.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file sort_all-1.3.0.tar.gz.

File metadata

  • Download URL: sort_all-1.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for sort_all-1.3.0.tar.gz
Algorithm Hash digest
SHA256 41fd883a4dcba38fef30e4dfc2c8ecf75dc6f450baa6c8bb2e6d30c7189fc148
MD5 7b743271880cd46ed68025405588188a
BLAKE2b-256 40be1325e717294bb01a69c9255ba397056b990abb2e03365554b5850a8483b3

See more details on using hashes here.

File details

Details for the file sort_all-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: sort_all-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for sort_all-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e452564993c1084a85b0d4600d00e638492d2fd9db7443c38627e9899f8e06a
MD5 b85dd18a5cbe17c87c9ee92914f20f1a
BLAKE2b-256 7c65dc790a4bf84e0b695a9b1d2a217bad7c88fa31d76fa3569b8daec75f2bc2

See more details on using hashes here.

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