summaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..fce2997
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,48 @@
+---
+exclude: |
+ (?x)(
+ ^docs/conf.py$|
+ ^_test/data/.*$
+ )
+repos:
+ - repo: https://github.com/PyCQA/isort
+ rev: 5.10.1
+ hooks:
+ - id: isort
+ - repo: https://github.com/python/black.git
+ rev: 21.12b0
+ hooks:
+ - id: black
+ language_version: python3
+ - repo: https://github.com/pre-commit/pre-commit-hooks.git
+ rev: v4.0.1
+ hooks:
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+ - id: mixed-line-ending
+ - id: check-byte-order-marker
+ - id: check-executables-have-shebangs
+ - id: check-merge-conflict
+ - id: debug-statements
+ language_version: python3
+ - repo: https://gitlab.com/pycqa/flake8.git
+ rev: 3.9.2
+ hooks:
+ - id: flake8
+ additional_dependencies:
+ - pydocstyle>=5.1.1
+ # - flake8-black>=0.1.1
+ - flake8-bugbear>=20.11.1
+ language_version: python3
+ - repo: https://github.com/pre-commit/mirrors-mypy
+ rev: v0.910-1
+ hooks:
+ - id: mypy
+ # empty args needed in order to match mypy cli behavior
+ args: ['--allow-redefinition']
+ entry: mypy lib/
+ pass_filenames: false
+ additional_dependencies:
+ - packaging
+ - rich
+ - subprocess-tee>=0.1.4