From 627927ea5c66f41420c03a04cd7315cb4e92ca18 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Tue, 15 Nov 2022 12:59:42 +0200 Subject: [PATCH] Update to mypy 0.991 for compatible-mypy & CI --- mypy.ini | 3 ++- requirements.txt | 2 +- scripts/enabled_test_modules.py | 3 +++ setup.py | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mypy.ini b/mypy.ini index ef5b0612f..fa0b71fc6 100644 --- a/mypy.ini +++ b/mypy.ini @@ -7,13 +7,14 @@ ignore_missing_imports = True incremental = True strict_optional = True show_traceback = True -warn_no_return = False warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True warn_unreachable = True disallow_untyped_defs = true disallow_incomplete_defs = true +show_error_codes = False +disable_error_code = empty-body plugins = mypy_django_plugin.main diff --git a/requirements.txt b/requirements.txt index 09a6d95e7..f046ccb46 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ psycopg2-binary -e .[compatible-mypy] # Overrides: -mypy==0.982 +mypy==0.991 diff --git a/scripts/enabled_test_modules.py b/scripts/enabled_test_modules.py index 6c6b7f24d..787ba68d6 100644 --- a/scripts/enabled_test_modules.py +++ b/scripts/enabled_test_modules.py @@ -113,6 +113,9 @@ 'error: "HttpResponse" has no attribute "streaming_content"', 'error: "HttpResponse" has no attribute "context_data"', 'Duplicate module named "apps"', + "Function is missing a return type annotation", + "Function is missing a type annotation", + "Library stubs not installed for ", ], "admin_checks": ['Argument 1 to "append" of "list" has incompatible type "str"; expected "CheckMessage"'], "admin_default_site": [ diff --git a/setup.py b/setup.py index 7345c3f3e..b2b0f9509 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def find_stub_files(name: str) -> List[str]: ] extras_require = { - "compatible-mypy": ["mypy>=0.980,<0.990"], + "compatible-mypy": ["mypy>=0.991,<0.1000"], } setup(