Pre-commit initial setup

This commit is contained in:
Carlos Camara 2024-01-12 20:33:18 +00:00
parent b04ebe397b
commit 51cc447508
2 changed files with 32 additions and 0 deletions

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

@ -0,0 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
types: [file, text]
- id: end-of-file-fixer
types: [file, text]
- id: check-docstring-first
- id: check-case-conflict
- id: check-yaml
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
types: [python]
- repo: local
hooks:
- id: pylint
args: ["--rcfile=.pylintrc"]
name: Pylint
entry: python -m pylint
language: system
files: \.py$
- repo: local
hooks:
- id: pytest
name: pytest
entry: ./bw-dev pytest
language: system
files: \.py$

View file

@ -47,6 +47,7 @@ pylint==2.14.0
mypy==1.5.1
celery-types==0.18.0
django-stubs[compatible-mypy]==4.2.4
pre-commit
types-bleach==6.0.0.4
types-dataclasses==0.6.6
types-Markdown==3.4.2.10