diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 38 |
1 files changed, 32 insertions, 6 deletions
@@ -1,5 +1,5 @@ [tox] -envlist = py3, lowest-supported-dev, flake8, pylint, black, isort +envlist = py3, lowest-supported-dev, black, flake8, isort, mypy, pylint recreate = True [testenv] @@ -10,10 +10,15 @@ passenv= PYTEST_ADDOPTS [format_deps] -flake8==3.9.2 -pylint==2.11.1 black==21.12b0 +flake8==3.9.2 isort==5.10.1 +mypy==0.931 +pylint==2.11.1 +pytest==7.0.0 +types-PyYAML==6.0.4 +types-requests==2.27.8 +types-setuptools==57.4.9 [testenv:flake8] deps = @@ -37,18 +42,30 @@ deps = isort=={[format_deps]isort} commands = {envpython} -m isort . --check-only +[testenv:mypy] +deps = + mypy=={[format_deps]mypy} + types-pyyaml=={[format_deps]types-PyYAML} + types-requests=={[format_deps]types-requests} + types-setuptools=={[format_deps]types-setuptools} + pytest=={[format_deps]pytest} +commands = {envpython} -m mypy . + [testenv:check_format] deps = - flake8=={[format_deps]flake8} - pylint=={[format_deps]pylint} black=={[format_deps]black} + flake8=={[format_deps]flake8} isort=={[format_deps]isort} + mypy=={[format_deps]mypy} + pylint=={[format_deps]pylint} + pytest=={[format_deps]pytest} -r{toxinidir}/test-requirements.txt -r{toxinidir}/integration-requirements.txt commands = {[testenv:black]commands} - {[testenv:isort]commands} {[testenv:flake8]commands} + {[testenv:isort]commands} + {[testenv:mypy]commands} {[testenv:pylint]commands} [testenv:do_format] @@ -122,6 +139,15 @@ commands = commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/ setup.py} deps = flake8 +[testenv:tip-mypy] +commands = {envpython} -m mypy --install-types --non-interactive . +deps = + mypy + pytest + types-PyYAML + types-requests + types-setuptools + [testenv:tip-pylint] commands = {envpython} -m pylint {posargs:cloudinit tests tools} deps = |