3737# https://github.com/dexpota/cheatsheets/blob/master/pre-commit
3838exclude : " ^tests/data"
3939fail_fast : true
40- default_stages : [commit]
40+ default_stages : [pre- commit]
4141repos :
4242- repo : local
4343 hooks :
4747 types : [binary]
4848 language : fail
4949- repo : https://github.com/pre-commit/pre-commit-hooks
50- rev : v4.6 .0
50+ rev : v6.0 .0
5151 hooks :
5252 - id : no-commit-to-branch
5353 args : [--branch, master]
@@ -62,76 +62,55 @@ repos:
6262 - isort
6363
6464
65+ - repo : https://github.com/pre-commit/pygrep-hooks
66+ rev : v1.10.0 # Use the ref you want to point at
67+ hooks :
68+ # Enforce that `# type: ignore` annotations always occur with specific codes.
69+ # Sample annotation: # type: ignore[attr-defined,name-defined]
70+ - id : python-check-blanket-type-ignore
71+
72+
6573- repo : https://github.com/pre-commit/mirrors-mypy
66- rev : v1.10.0
74+ rev : v1.17.1
6775 hooks :
6876 - id : mypy
6977 additional_dependencies :
78+ - pyfakefs
79+ - pytest_httpserver
7080 - pytest-subprocess
7181 - types-mock
7282 - types-six
7383 - types-toml
7484
7585
7686- repo : https://github.com/rcmdnk/pyproject-pre-commit
77- rev : v0.1.9
87+ rev : v0.4.2
7888 hooks :
7989 - id : shellcheck
8090
8191
8292- repo : https://github.com/igorshubovych/markdownlint-cli
83- rev : v0.42 .0
93+ rev : v0.45 .0
8494 hooks :
8595 - id : markdownlint
8696
8797
88- - repo : https://github.com/pycqa/pylint
89- rev : v2.17.4
90- hooks :
91- - id : pylint
92- args :
93- [
94- -sn, # Don't display the score
95- --load-plugins=pylint.extensions.eq_without_hash,
96- --ignore-imports=yes,
97- " --disable=duplicate-code,line-too-long" ,
98- ]
99- log_file : " .git/pre-commit-pylint.log"
100- additional_dependencies :
101- - pyfakefs
102- - six
103- - mock
104- - pandas
105- - pytest_forked
106- - toml
10798- repo : local
10899 hooks :
109- - id : pytype
110- name : pytype (may take up to two minutes)
111- entry : sh -c "pytype >/dev/tty"
112- types : [python]
113- verbose : true
114- language : python
115- language_version : python3.8
116- require_serial : true
117- additional_dependencies : [pytype]
118- - id : pytest
119- name : Check pytest unit tests pass
100+ - id : tox
101+ name : pytest unit tests and static analysis using tox
120102 types : [python]
121103 # entry: sh -c "pytest -x -rf --new-first --show-capture=all >/dev/tty"
122- entry : sh -c "tox -e py38-covcombine >/dev/tty"
104+ entry : sh -c "tox -e py311-cov-check-pytype-pyright-lint-mdreport >/dev/tty"
123105 verbose : true
124106 language : python
125107 require_serial : true
126108 pass_filenames : false
127- - repo : https://github.com/pre-commit/pygrep-hooks
128- rev : v1.10.0 # Use the ref you want to point at
129- hooks :
130- # Enforce that `# type: ignore` annotations always occur with specific codes.
131- # Sample annotations: # type: ignore[attr-defined] # type: ignore[attr-defined,name-defined]
132- - id : python-check-blanket-type-ignore
109+ additional_dependencies : [tox]
110+
111+
133112- repo : https://github.com/pre-commit/pre-commit-hooks
134- rev : v4.6 .0
113+ rev : v6.0 .0
135114 hooks :
136115 - id : trailing-whitespace
137116 - id : end-of-file-fixer
0 commit comments