Skip to content

Commit 416a719

Browse files
authored
Introduce manual mypy checking on the docs/ dir (#1412)
2 parents 43dd17d + be42d78 commit 416a719

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ sqlite_cache = true
181181
warn_unreachable = true
182182
warn_no_return = true
183183

184+
[[tool.mypy.overrides]]
185+
module = "docs.*"
186+
allow_untyped_calls = true
187+
allow_untyped_defs = true
188+
ignore_missing_imports = true
189+
184190
[tool.pylint]
185191
load-plugins = ["pylint.extensions.docparams"]
186192
accept-no-param-doc = "false"

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ commands = mypy src/ {posargs}
6161
base = mypy
6262
commands = mypy --show-error-codes --warn-unused-ignores tests/non-pytest/mypy-ignore-tests/
6363

64+
[testenv:mypy-docs]
65+
base = mypy
66+
# docs isn't really a package, so avoid errors related to it being improperly
67+
# treated like one (this doesn't work via config)
68+
commands = mypy --explicit-package-bases {posargs:docs/}
69+
6470
[testenv:test-lazy-imports]
6571
deps = -r requirements/py{py_dot_ver}/test.txt
6672
commands =

0 commit comments

Comments
 (0)