diff options
author | Brett Holman <bholman.devel@gmail.com> | 2022-04-12 09:17:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 09:17:12 -0500 |
commit | 1b2d069a11412fb5b778edb424552b6aaebdcf98 (patch) | |
tree | bb2c1be225b1d375ef893e48f8610cee41f84577 /tox.ini | |
parent | e5b377987f263cdd7c396a227831a801fbad805c (diff) | |
download | cloud-init-git-1b2d069a11412fb5b778edb424552b6aaebdcf98.tar.gz |
Mypy stubs and other tox maintenance (SC-920) (#1374)
- add type stubs for mypy: jsonschema, oauthlib
- specify mypy directories to avoid env/ false positive
- add conftest.py and setup.py
- make setup.py pass pylint:
- check ./tools/render-cloudcfg return code in setup.py
- find_sources() has no return code, don't check for one
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -16,6 +16,8 @@ isort==5.10.1 mypy==0.931 pylint==2.11.1 pytest==7.0.0 +types-jsonschema==4.4.2 +types-oauthlib==3.1.6 types-PyYAML==6.0.4 types-requests==2.27.8 types-setuptools==57.4.9 @@ -23,14 +25,14 @@ types-setuptools==57.4.9 [testenv:flake8] deps = flake8=={[format_deps]flake8} -commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/ setup.py} +commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/ conftest.py setup.py} [testenv:pylint] deps = pylint=={[format_deps]pylint} -r{toxinidir}/test-requirements.txt -r{toxinidir}/integration-requirements.txt -commands = {envpython} -m pylint {posargs:cloudinit tests tools} +commands = {envpython} -m pylint {posargs:cloudinit/ tests/ tools/ conftest.py setup.py} [testenv:black] deps = @@ -45,11 +47,13 @@ commands = {envpython} -m isort . --check-only [testenv:mypy] deps = mypy=={[format_deps]mypy} + types-jsonschema=={[format_deps]types-jsonschema} + types-oauthlib=={[format_deps]types-oauthlib} 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 . +commands = {envpython} -m mypy cloudinit/ tests/ tools/ [testenv:check_format] deps = @@ -59,6 +63,8 @@ deps = mypy=={[format_deps]mypy} pylint=={[format_deps]pylint} pytest=={[format_deps]pytest} + types-jsonschema=={[format_deps]types-jsonschema} + types-oauthlib=={[format_deps]types-oauthlib} types-pyyaml=={[format_deps]types-PyYAML} types-requests=={[format_deps]types-requests} types-setuptools=={[format_deps]types-setuptools} @@ -139,20 +145,22 @@ commands = doc8 doc/rtd [testenv:tip-flake8] -commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/ setup.py} +commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/ conftest.py setup.py} deps = flake8 [testenv:tip-mypy] -commands = {envpython} -m mypy --install-types --non-interactive . +commands = {envpython} -m mypy --install-types --non-interactive cloudinit/ tests/ tools/ deps = mypy pytest + types-jsonschema + types-oauthlib types-PyYAML types-requests types-setuptools [testenv:tip-pylint] -commands = {envpython} -m pylint {posargs:cloudinit tests tools} +commands = {envpython} -m pylint {posargs:cloudinit/ tests/ tools/ conftest.py setup.py} deps = # requirements pylint |