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
asort-0.1.3.tar.gz
(9.7 kB
view hashes)
Built Distribution
asort-0.1.3-py3-none-any.whl
(9.8 kB
view hashes)