An opinionated CLI for asottile/reorder_python_imports
Project description
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.
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
Built Distribution
Hashes for sorti-2.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b956b4f1cac2de7954c7ddc4e19622100e8b8b2344ee2408f2765014dd6bf5d8 |
|
MD5 | ea8e059e932f883ec59b32e5712bbfac |
|
BLAKE2b-256 | 2953bc9ce2175b3efda9b54eb47f5b34e573cbd1e73d1d64223ae8f7eba494d0 |