osbuild: add "mypy-strict" check

This commit is contained in:
Michael Vogt 2023-11-27 22:07:06 +01:00 committed by Simon de Vlieger
parent a56afcb280
commit d8835150c2
3 changed files with 20 additions and 7 deletions

10
tox.ini
View file

@ -7,7 +7,7 @@ env_list =
labels =
test = py{36,37,38,39,310,311}
lint = ruff, isort, autopep8, pylint
type = mypy
type = mypy,mypy-strict
[testenv]
description = "run osbuild unit tests"
@ -26,6 +26,7 @@ deps =
setenv =
LINTABLES = osbuild/ assemblers/* devices/* inputs/* mounts/* runners/* sources/* stages/*.* stages/test/*.py test/ tools/
TYPEABLES = osbuild
TYPEABLES_STRICT = ./osbuild/main_cli.py
passenv =
TEST_CATEGORY
@ -71,3 +72,10 @@ deps =
commands =
bash -c 'python -m mypy {env:TYPEABLES}'
[testenv:mypy-strict]
deps =
mypy==1.2.0
commands =
bash -c 'python -m mypy --follow-imports=skip --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs {env:TYPEABLES_STRICT}'