mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
[isort](https://isort.readthedocs.io/en/latest/) sorts your Python imports so you don't have to. This makes sure that imports are always where they should be and prevents issues like duplicated imports and merge conflicts. Using pre-commit, this can be done automatically without any manual steps. Depends on #9.
25 lines
600 B
YAML
25 lines
600 B
YAML
repos:
|
|
# Meta housekeeping to keep pre-commit operating correctly
|
|
- repo: meta
|
|
hooks:
|
|
- id: check-hooks-apply
|
|
- id: check-useless-excludes
|
|
|
|
# General housekeeping and auto-fixers
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v1.3.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
|
|
# Python import formatting
|
|
- repo: https://github.com/asottile/seed-isort-config
|
|
rev: v1.9.3
|
|
hooks:
|
|
- id: seed-isort-config
|
|
|
|
- repo: https://github.com/timothycrosley/isort
|
|
rev: 4.3.21-2
|
|
hooks:
|
|
- id: isort
|
|
additional_dependencies: ["toml"]
|