diff options
author | toofar <toofar@spalge.com> | 2022-09-11 10:17:28 +1200 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2022-09-11 10:19:44 +1200 |
commit | c1738ca55006966e7c0ad9eacbfb58625aa88c44 (patch) | |
tree | 72352409bb65c61b0e81d64141efa2f7bfde05d2 /tox.ini | |
parent | 8decafefbe94c111c1cd1b59aeb0b314cb4de5c9 (diff) | |
download | qutebrowser-c1738ca55006966e7c0ad9eacbfb58625aa88c44.tar.gz qutebrowser-c1738ca55006966e7c0ad9eacbfb58625aa88c44.zip |
tox: split mypy env into mypy-{qt5,qt6}
Would be nice to have a bare `mypy` env which ran both the more specific ones
in sequence but I don't know how to do that.
Not sure if there is a way to pull the CONSTANTS_ARGS stuff out to a non-env
parameter and pass it into commands but I couldn't figure out a way. So via
the environment it is.
TODO: compare PyQt6 as-is with the WIP PyQt6-Stub
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -180,16 +180,19 @@ deps = whitelist_externals = bash commands = bash scripts/dev/run_shellcheck.sh {posargs} -[testenv:mypy] +[testenv:mypy-{qt5,qt6}] basepython = {env:PYTHON:python3} passenv = TERM MYPY_FORCE_TERMINAL_WIDTH +setenv = + qt6: CONSTANTS_ARGS=--always-true=USE_PYQT6 --always-false=USE_PYQT5 --always-false=USE_PYSIDE2 --always-false=USE_PYSIDE6 --always-false=IS_QT5 --always-true=IS_QT6 + qt5: CONSTANTS_ARGS=--always-false=USE_PYQT6 --always-true=USE_PYQT5 --always-false=USE_PYSIDE2 --always-false=USE_PYSIDE6 --always-true=IS_QT5 --always-false=IS_QT6 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/misc/requirements/requirements-dev.txt -r{toxinidir}/misc/requirements/requirements-tests.txt -r{toxinidir}/misc/requirements/requirements-mypy.txt commands = - {envpython} -m mypy qutebrowser {posargs} + {envpython} -m mypy {env:CONSTANTS_ARGS} qutebrowser {posargs} [testenv:yamllint] basepython = {env:PYTHON:python3} @@ -204,12 +207,15 @@ whitelist_externals = actionlint commands = actionlint -[testenv:mypy-diff] +[testenv:mypy-{qt5,qt6}-diff] basepython = {env:PYTHON:python3} -passenv = {[testenv:mypy]passenv} -deps = {[testenv:mypy]deps} +passenv = {[testenv:mypy-qt6]passenv} +deps = {[testenv:mypy-qt6]deps} +setenv = + qt6: CONSTANTS_ARGS=--always-true=USE_PYQT6 --always-false=USE_PYQT5 --always-false=USE_PYSIDE2 --always-false=USE_PYSIDE6 --always-false=IS_QT5 --always-true=IS_QT6 + qt5: CONSTANTS_ARGS=--always-false=USE_PYQT6 --always-true=USE_PYQT5 --always-false=USE_PYSIDE2 --always-false=USE_PYSIDE6 --always-true=IS_QT5 --always-false=IS_QT6 commands = - {envpython} -m mypy --cobertura-xml-report {envtmpdir} qutebrowser tests {posargs} + {envpython} -m mypy --cobertura-xml-report {envtmpdir} {env:CONSTANTS_ARGS} 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] |