Skip to main content

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.

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.

Files for sorti, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size sorti-2.0.0-py2.py3-none-any.whl (3.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size sorti-2.0.0.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page