This is a pre-commit hook that will sort your imports for you (or show you how it should be done).
Add this to your .pre-commit-config.yaml
file
- repo: [email protected]:FalconSocial/pre-commit-python-sorter.git
sha: 1.0.1
hooks:
- id: python-import-sorter
args: ['--silent-overwrite']
Available flags:
--silent-overwrite
: The hook won't fail if it has to change files. It will just do it.
The hook supports isort's configuration files - Please refer to the isort documentation for reference
Development: pip install -r requirements-dev.txt
Testing: py.test --cov pre_commit_hook tests/