A Python utility / library to sort __all__ lists.
Project description
asort
asort for __all__ your __all__ lists
asort is a Python utility / library to sort imports items in an __all__ list alphabetically
It provides a command line utility, Python library and pre-commit support to
quickly sort all your imports. It requires Python 3.7+ to run but supports formatting
any version of Python code.
Works seemlessly with black and isort with no configuration needed
Before asort:
from my_lib import Object
from my_lib import Object3
from my_lib import Object2
__all__ = [
"Object",
"Object3",
"Object2",
]
After asort:
from my_lib import Object
from my_lib import Object3
from my_lib import Object2
__all__ = [
"Object",
"Object2",
"Object3",
]
Installing asort
Installing asort is as simple as:
pip install asort
Using asort
See usage examples on our documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asort-0.1.3.tar.gz.
File metadata
- Download URL: asort-0.1.3.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc7965a9b5012199cf3d76622438de5563b9c16e2ef832c80641476a0cd27e75
|
|
| MD5 |
b1f7bd2919d3405c9288b1a20c9f709e
|
|
| BLAKE2b-256 |
ff5d0448203c4eb290b26d703a9f42098ac8c3ee60f04549408c314b3471f9d8
|
File details
Details for the file asort-0.1.3-py3-none-any.whl.
File metadata
- Download URL: asort-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d08408e2e21b884554216c829607a7af8bda15b60e71fb72f209a3b4b6c8b35d
|
|
| MD5 |
58ab18e04ba639dceb2531f8d89ab3c3
|
|
| BLAKE2b-256 |
68c4eef6b8786b32c7b864ca351c57f65f97ab450b254977be76ceba689f84e8
|