🧑‍💻 Add pre-commit

This commit is contained in:
Karl Engelhardt 2022-04-28 15:20:50 +02:00
parent 0ed37ea480
commit da21081be0
No known key found for this signature in database
GPG key ID: F5C81386F612E3F4
2 changed files with 36 additions and 19 deletions

18
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.6.4
hooks:
- id: isort
args: ['--profile', 'black', '--filter-files']
- repo: https://github.com/psf/black
rev: '22.3.0' # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
- repo: https://github.com/pycqa/flake8
rev: '3.9.2' # pick a git hash / tag to point to
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==21.4.3]
exclude: ^.*/migrations/.*$
exclude: ^.*/migrations/.*$