Add pre commit (#103)

* add pre-commit

* run pre-commit

* skip lint on README.md as it breaks template filling
This commit is contained in:
Paul Robinson
2023-10-04 13:32:07 -06:00
committed by GitHub
parent efcb97c348
commit 7099bbaaa4
15 changed files with 82 additions and 67 deletions

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

@ -0,0 +1,37 @@
exclude: '.project-template|docs/conf.py'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.9.16
exclude: setup.py
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
exclude: tests/