diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..60ee12c97 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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$ diff --git a/requirements.txt b/requirements.txt index 6509effc7..4eee83b2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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