Run mypy over tests as well

Rationale: https://twitter.com/codewithanthony/status/1188958327318794241
This commit is contained in:
Florian Bruhin 2019-10-29 12:10:32 +01:00
parent 0b8801b333
commit ede2dcf4c2
3 changed files with 12 additions and 3 deletions

View File

@ -51,6 +51,14 @@ ignore_missing_imports = True
# https://github.com/python/typeshed/issues/1019
ignore_missing_imports = True
[mypy-helpers.*]
# test helpers only importable via pytest
ignore_missing_imports = True
[mypy-pytest]
# https://github.com/pytest-dev/pytest/issues/3342
ignore_missing_imports = True
[mypy-qutebrowser.browser.webkit.rfc6266]
# subclasses dynamic PyPEG2 classes
disallow_subclassing_any = False

View File

@ -87,7 +87,7 @@ def _apply_platform_markers(config, item):
('unicode_locale', sys.getfilesystemencoding() == 'ascii',
"Skipped because of ASCII locale"),
('qtwebkit6021_skip',
version.qWebKitVersion and
version.qWebKitVersion and # type: ignore
version.qWebKitVersion() == '602.1',
"Broken on WebKit 602.1")
]
@ -211,7 +211,7 @@ def pytest_configure(config):
try:
# Added in sip 4.19.4
sip.enableoverflowchecking(True)
sip.enableoverflowchecking(True) # type: ignore
except AttributeError:
pass

View File

@ -197,10 +197,11 @@ passenv = TERM
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/misc/requirements/requirements-dev.txt
-r{toxinidir}/misc/requirements/requirements-tests.txt
-r{toxinidir}/misc/requirements/requirements-pyqt.txt
-r{toxinidir}/misc/requirements/requirements-mypy.txt
commands =
{envpython} -m mypy qutebrowser {posargs}
{envpython} -m mypy qutebrowser tests {posargs}
[testenv:sphinx]
basepython = {env:PYTHON:python3}