Add pre-commit config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michal Kunc 2023-02-17 15:21:26 +01:00
parent 947d9f740c
commit 8cb0554696

40
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,40 @@
repos:
- repo: local
hooks:
- id: poetry
name: poetry
language: system
entry: poetry check
files: '^(pyproject.toml|poetry.lock)$'
pass_filenames: false
# - id: black
# name: black
# language: system
# entry: poetry run black --target-version py39
# types_or: [python, pyi]
# require_serial: true
# - id: isort
# name: isort
# language: system
# entry: poetry run isort --profile black --python-version 39
# types_or: [cython, pyi, python]
# require_serial: true
# - id: flake8
# name: flake8
# language: system
# entry: poetry run flake8
# types_or: [python]
# files: "^.*\\.py$"
# - id: mypy
# name: mypy
# language: system
# entry: poetry run mypy --strict --python-version 3.9
# types_or: [python, pyi]
# files: "^.*\\.pyi?$"
- id: test
name: test
language: system
entry: poetry run ./manage.py test
types_or: [python]
files: "^.*\\.py$"
pass_filenames: false