chore: add isort pre-commit hook

This commit is contained in:
jo 2022-11-19 15:58:57 +01:00
parent 4159bc1209
commit 20ed5f0d52
No known key found for this signature in database
GPG Key ID: B2FEC9B22722B984
3 changed files with 10 additions and 3 deletions

View File

@ -29,6 +29,11 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:

View File

@ -1,6 +1,3 @@
[isort]
skip_glob = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules
[pep8]
max-line-length = 120
exclude=.tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules

View File

@ -60,3 +60,8 @@ showcontent = true
[tool.black]
extend-exclude = "(api/.*/migrations/.*)"
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"]