jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Enable mypy tests

Change-Id: I43581d3bd3781c502e412506b17b692f804207ab
---
M mypy.ini
M tox.ini
2 files changed, 29 insertions(+), 9 deletions(-)

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_unused_ignores#introduce-stricter-options
+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

To view, visit change 960208. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I43581d3bd3781c502e412506b17b692f804207ab
Gerrit-Change-Number: 960208
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Hashar <hashar@free.fr>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged