From e1dc9e8d577c094b5d902688265832393ef399a2 Mon Sep 17 00:00:00 2001 From: Kacper Szmigiel Date: Fri, 5 Jun 2020 00:03:52 +0200 Subject: [PATCH 1/6] updated mypy dependency --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e66ed3c2c..b915b92d1 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def find_stub_files(name: str) -> List[str]: readme = f.read() dependencies = [ - 'mypy>=0.770,<0.780', + 'mypy>=0.780,<0.790', 'typing-extensions', 'django', ] From bc93fa9a0a8e1a111876859f707f2a45c77c16fe Mon Sep 17 00:00:00 2001 From: Kacper Szmigiel Date: Fri, 5 Jun 2020 00:40:26 +0200 Subject: [PATCH 2/6] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 86bf7d9a2..c057b7777 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ We rely on different `django` and `mypy` versions: | django-stubs | mypy version | django version | python version | ------------ | ---- | ---- | ---- | +| 1.5.0 | ^0.770 | 3.0.x | ^3.7.7 | 1.3.0 | 0.750 | 2.2.x | ^3.6 | 1.2.0 | 0.730 | 2.2.x | ^3.6 | 1.1.0 | 0.720 | 2.2.x | ^3.6 From e9c32e92626b23c009e8fedc7927051628a80497 Mon Sep 17 00:00:00 2001 From: Kacper Szmigiel Date: Fri, 5 Jun 2020 01:25:53 +0200 Subject: [PATCH 3/6] readme update v2 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c057b7777..b9d25f7fd 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,9 @@ We rely on different `django` and `mypy` versions: | django-stubs | mypy version | django version | python version | ------------ | ---- | ---- | ---- | -| 1.5.0 | ^0.770 | 3.0.x | ^3.7.7 -| 1.3.0 | 0.750 | 2.2.x | ^3.6 +| 1.5.0 | 0.780 | 2.2.x \|\| 3.x | ^3.6 +| 1.4.0 | 0.770 | 2.2.x \|\| 3.x | ^3.6 +| 1.3.0 | 0.750 | 2.2.x \|\| 3.x | ^3.6 | 1.2.0 | 0.730 | 2.2.x | ^3.6 | 1.1.0 | 0.720 | 2.2.x | ^3.6 | 0.12.x | old semantic analyzer (<0.711), dmypy support | 2.1.x | ^3.6 From d0e550769706e1f75de9bca111a2055565f8b564 Mon Sep 17 00:00:00 2001 From: Kacper Szmigiel Date: Fri, 5 Jun 2020 02:11:57 +0200 Subject: [PATCH 4/6] pytest-mypy-plugins newer version --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 37b27957c..a845f69ce 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ black -pytest-mypy-plugins==1.2.0 +pytest-mypy-plugins==1.3.0 psycopg2 flake8==3.7.9 flake8-pyi==19.3.0 From d898b1b9fc75e4036aba278b1e023c3e65acdfd1 Mon Sep 17 00:00:00 2001 From: Kacper Szmigiel Date: Fri, 5 Jun 2020 23:10:46 +0200 Subject: [PATCH 5/6] updated pytest_mypy_plugins name --- scripts/tests_extension_hook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tests_extension_hook.py b/scripts/tests_extension_hook.py index f69d03410..228cc7675 100644 --- a/scripts/tests_extension_hook.py +++ b/scripts/tests_extension_hook.py @@ -1,5 +1,5 @@ -from pytest_mypy.collect import File -from pytest_mypy.item import YamlTestItem +from pytest_mypy_plugins.collect import File +from pytest_mypy_plugins.item import YamlTestItem def django_plugin_hook(test_item: YamlTestItem) -> None: From 5a318d8f7b47f38025875911e6c7e4fb669a9d07 Mon Sep 17 00:00:00 2001 From: Kacper Szmigiel Date: Sat, 6 Jun 2020 00:10:19 +0200 Subject: [PATCH 6/6] update ignored errors for typechecking django test suite --- scripts/enabled_test_modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/enabled_test_modules.py b/scripts/enabled_test_modules.py index 4e0197841..49e519e66 100644 --- a/scripts/enabled_test_modules.py +++ b/scripts/enabled_test_modules.py @@ -185,6 +185,8 @@ ], 'files': [ 'Incompatible types in assignment (expression has type "IOBase", variable has type "File")', + 'Argument 1 to "TextIOWrapper" has incompatible type "File"; expected "BinaryIO"', + 'Incompatible types in assignment (expression has type "BinaryIO", variable has type "File")', ], 'filtered_relation': [ 'has no attribute "name"', @@ -378,6 +380,7 @@ 'responses': [ 'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "IO[bytes]"', '"FileLike" has no attribute "closed"', + 'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "BinaryIO"', ], 'reverse_lookup': [ "Cannot resolve keyword 'choice' into field"