jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/960208 )
Change subject: [tests] Enable mypy tests ......................................................................
[tests] Enable mypy tests
Change-Id: I43581d3bd3781c502e412506b17b692f804207ab --- M mypy.ini M tox.ini 2 files changed, 29 insertions(+), 9 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/mypy.ini b/mypy.ini index 4a36827..a656812 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,11 +1,15 @@ [mypy] -python_version = 3.6 -check_untyped_defs = true -disallow_any_generics = true -disallow_incomplete_defs = true -disallow_untyped_defs = true ignore_missing_imports = true -no_implicit_optional = true -show_error_codes = true -warn_redundant_casts = true -warn_unused_ignores = true +# should be set to false later +implicit_optional = true +# The following should be set to true as soon as possible; see +# https://mypy.readthedocs.io/en/stable/existing_code.html?highlight=warn_unus... +warn_unused_ignores = false +warn_redundant_casts = false + +check_untyped_defs = false + +disallow_any_generics = false + +disallow_incomplete_defs = false +disallow_untyped_defs = false diff --git a/tox.ini b/tox.ini index beaa8d2..0517f22 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,13 @@ deeptest-py39: pytest >= 7.0.1 deeptest-py39: pytest-subtests >= 0.3.2
+[testenv:typing] +basepython = python3.9 +deps = pytest-mypy +commands = + mypy --version + pytest --mypy -m mypy pywikibot + [testenv:commit-message] basepython = python3 deps = commit-message-validator