Skip to content

Commit 4a265ba

Browse files
authored
Merge pull request #6446 from blueyed/tox-mypy
tox: add mypy toxenv
2 parents 910d5df + 0e70aca commit 4a265ba

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737
- id: pyupgrade
3838
args: [--py3-plus]
3939
- repo: https://github.com/pre-commit/mirrors-mypy
40-
rev: v0.761
40+
rev: v0.761 # NOTE: keep this in sync with setup.py.
4141
hooks:
4242
- id: mypy
4343
files: ^(src/|testing/)

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ def main():
2929
"nose",
3030
"requests",
3131
"xmlschema",
32-
]
32+
],
33+
"checkqa-mypy": [
34+
"mypy==v0.761", # keep this in sync with .pre-commit-config.yaml.
35+
],
3336
},
3437
install_requires=INSTALL_REQUIRES,
3538
)

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ basepython = python3
5555
deps = pre-commit>=1.11.0
5656
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
5757

58+
[testenv:mypy]
59+
extras = checkqa-mypy, testing
60+
commands = mypy {posargs:src testing}
61+
5862
[testenv:docs]
5963
basepython = python3
6064
usedevelop = True

0 commit comments

Comments
 (0)