Add pre-commit git hooks

This commit is contained in:
coolneng 2021-01-06 21:47:18 +01:00
parent 71517bb8b2
commit 86e44cdf05
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 24 additions and 0 deletions

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

@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
files: ^src/
- repo: https://github.com/pycqa/isort
rev: 5.5.2
hooks:
- id: isort
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest
language: system
pass_filenames: false
always_run: true