diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-06-24 14:39:00 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-06-24 15:01:16 +0200 |
commit | 0e2db8eadc752d9502fba6d9697c67ca91550997 (patch) | |
tree | 5a6dd3c12742f1d41c5052f08b002483318f4822 | |
parent | a04e7fe0df6f52146b7fa95a9fbf71b82bf0967a (diff) | |
download | qutebrowser-0e2db8eadc752d9502fba6d9697c67ca91550997.tar.gz qutebrowser-0e2db8eadc752d9502fba6d9697c67ca91550997.zip |
Add "tox -e mypy-diff"
Not done by default with "tox -e mypy" because it disables mypy's caching,
causing its runtime to go from <1s to ~15s:
https://github.com/python/mypy/issues/9041
See #1456
-rw-r--r-- | misc/requirements/requirements-mypy.txt | 8 | ||||
-rw-r--r-- | misc/requirements/requirements-mypy.txt-raw | 1 | ||||
-rw-r--r-- | tox.ini | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 595d94889..1bc35f0ce 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,8 +1,16 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py +diff-cover==3.0.1 +inflect==4.1.0 +Jinja2==2.11.2 +jinja2-pluralize==0.3.0 lxml==4.5.1 +MarkupSafe==1.1.1 mypy==0.782 mypy-extensions==0.4.3 +pluggy==0.13.1 +Pygments==2.6.1 -e git+https://github.com/stlehmann/PyQt5-stubs.git@master#egg=PyQt5_stubs +six==1.15.0 typed-ast==1.4.1 typing-extensions==3.7.4.2 diff --git a/misc/requirements/requirements-mypy.txt-raw b/misc/requirements/requirements-mypy.txt-raw index 51e2cbfc0..d3b0dc4ca 100644 --- a/misc/requirements/requirements-mypy.txt-raw +++ b/misc/requirements/requirements-mypy.txt-raw @@ -1,5 +1,6 @@ mypy lxml # For HTML reports +diff-cover -e git+https://github.com/stlehmann/PyQt5-stubs.git@master#egg=PyQt5-stubs # remove @commit-id for scm installs @@ -200,6 +200,15 @@ deps = commands = {envpython} -m mypy qutebrowser tests {posargs} +[testenv:mypy-diff] +basepython = {env:PYTHON:python3} +pip_version = pip +passenv = {[testenv:mypy]passenv} +deps = {[testenv:mypy]deps} +commands = + {envpython} -m mypy --cobertura-xml-report {envtmpdir} qutebrowser tests {posargs} + {envdir}/bin/diff-cover --fail-under=100 --compare-branch={env:DIFF_BRANCH:origin/{env:GITHUB_BASE_REF:master}} {envtmpdir}/cobertura.xml + [testenv:sphinx] basepython = {env:PYTHON:python3} pip_version = pip |