Statically populate the `known_third_party` `isort` setting.
Statically populate the
isort when run in isolation is not the best at determining what
dependencies are third party.
aspy.refactor_imports is fortunately much better at
this static analysis.
Why not just use
reorder-python-imports? Well, it
lacks a few features provided by
What this script does is seeds the
known_third_party isort configuration
pip install seed-isort-config
seed-isort-config provides a single executable by the same name. Run it
To specify custom application roots (such as with the
src pattern) pass a
Files may be excluded from the process using the
This argument takes a python regular expression.
For a full list of arguments, see
seed-isort-config looks for an existing
known_third_party setting in an
isort configuration file. It will modify that if it exists, otherwise it'll
create a brand new
The easiest way to get started is to just add a blank
section to your isort configuration (or
known_third_party =  if you are
usage with pre-commit
This works especially well when integrated with
- repo: https://github.com/asottile/seed-isort-config rev: v2.2.0 hooks: - id: seed-isort-config - repo: https://github.com/timothycrosley/isort rev: 4.3.21 # pick the isort version you'd like to use from https://github.com/timothycrosley/isort/releases hooks: - id: isort
In this configuration,
seed-isort-config will adjust the
section of the
isort configuration before
seed-isort-config doesn't act like a normal pre-commit linter so
file exclusion must be configured through
args: [--exclude=...] instead.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size seed_isort_config-2.2.0-py2.py3-none-any.whl (5.5 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size seed_isort_config-2.2.0.tar.gz (5.4 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for seed_isort_config-2.2.0-py2.py3-none-any.whl