sorti
An opinionated CLI for asottile/reorder_python_imports.
Installation
pip install sorti
Usage
sorti [-h] [--check] [--version] [source [source ...]]
Examples
Sorting imports in a single file
sorti my/file.py
Checking if any files in a directory need sorting
sorti --check my/directory
Why?
This package makes the features of reorder_python_imports fit into my workflow. I think the original project is awesome, but the CLI does not work the way I would like it to.
My opinions diverge from asottile's on these issues.
- https://github.com/asottile/reorder_python_imports/issues/45
- https://github.com/asottile/reorder_python_imports/issues/74
- https://github.com/asottile/reorder_python_imports/pull/76
So, sorti will support a much narrower use case than the original project.
The command has one flag: --check, which will make the command output the
files it would change and return an exit code of 1 if there are changes to be
made.
sorti uses source file discovery from python/black and aims to find the
same files, given the same inputs.
I don't intend to support anything else than latest stable Python, for the moment that is 3.7.
The name sorti which means exit in Swedish seemed fitting since the divergence of opinions that lead to its creation was about exit codes, it's also a play on the popular import sorter isort. In Old Norse it means black cloud, which also seems appropriate since it uses parts of black.
Metadata
Release files for sorti 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sorti-2.0.1.tar.gz | 3.9 kB | Without provenance | Details for sorti-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sorti-2.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for sorti-2.0.1-py2.py3-none-any.whl |
Total release size: 8.0 kB
Release files / sorti-2.0.1.tar.gz
| Download URL | sorti-2.0.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78096f944799a4db76d4ca3d883a4ec9c319f40c9a0a523c0c2d975bbb7a0aea
|
|
BLAKE2b-256 checksum How to use checksums |
6d89863fc2d5d50ada816ffbe781ccf4a8d9d840ab235961c007049dc7746ceb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.8.0
|
Release files / sorti-2.0.1-py2.py3-none-any.whl
| Download URL | sorti-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
55ccd0ab353628f52baf7fe74f6d6fba5ce0a413c548acdb4a3df48334737dbe
|
|
BLAKE2b-256 checksum How to use checksums |
5aecce7f73c43bb7ab24cd9763c75507399f3a1d9c50d3af872fa593eecd6b84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.8.0
|
Security for sorti 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.