chore: add isort pre-commit hook
This commit is contained in:
parent
4159bc1209
commit
20ed5f0d52
|
@ -29,6 +29,11 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
|
- repo: https://github.com/pycqa/isort
|
||||||
|
rev: 5.10.1
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/flake8
|
- repo: https://github.com/pycqa/flake8
|
||||||
rev: 5.0.4
|
rev: 5.0.4
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
[isort]
|
|
||||||
skip_glob = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules
|
|
||||||
|
|
||||||
[pep8]
|
[pep8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude=.tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules
|
exclude=.tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules
|
||||||
|
|
|
@ -60,3 +60,8 @@ showcontent = true
|
||||||
[tool.black]
|
[tool.black]
|
||||||
extend-exclude = "(api/.*/migrations/.*)"
|
extend-exclude = "(api/.*/migrations/.*)"
|
||||||
force-exclude = "(api/.*/migrations/.*)" # pre-commit pass files as args
|
force-exclude = "(api/.*/migrations/.*)" # pre-commit pass files as args
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
extend_skip_glob = ["api/*/migrations/*"]
|
||||||
|
known_first_party = ["funkwhale_api", "config"]
|
||||||
|
|
Loading…
Reference in New Issue