Skip to content

Commit 4c5723d

Browse files
kszmigielKacper Szmigiel
andauthored
WIP Issue 388 (#390)
* updated mypy dependency * update readme * readme update v2 * pytest-mypy-plugins newer version * updated pytest_mypy_plugins name * update ignored errors for typechecking django test suite Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>
1 parent 7e0e431 commit 4c5723d

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ We rely on different `django` and `mypy` versions:
4747

4848
| django-stubs | mypy version | django version | python version
4949
| ------------ | ---- | ---- | ---- |
50-
| 1.3.0 | 0.750 | 2.2.x | ^3.6
50+
| 1.5.0 | 0.780 | 2.2.x \|\| 3.x | ^3.6
51+
| 1.4.0 | 0.770 | 2.2.x \|\| 3.x | ^3.6
52+
| 1.3.0 | 0.750 | 2.2.x \|\| 3.x | ^3.6
5153
| 1.2.0 | 0.730 | 2.2.x | ^3.6
5254
| 1.1.0 | 0.720 | 2.2.x | ^3.6
5355
| 0.12.x | old semantic analyzer (<0.711), dmypy support | 2.1.x | ^3.6

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
black
2-
pytest-mypy-plugins==1.2.0
2+
pytest-mypy-plugins==1.3.0
33
psycopg2
44
flake8==3.7.9
55
flake8-pyi==19.3.0

scripts/enabled_test_modules.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@
185185
],
186186
'files': [
187187
'Incompatible types in assignment (expression has type "IOBase", variable has type "File")',
188+
'Argument 1 to "TextIOWrapper" has incompatible type "File"; expected "BinaryIO"',
189+
'Incompatible types in assignment (expression has type "BinaryIO", variable has type "File")',
188190
],
189191
'filtered_relation': [
190192
'has no attribute "name"',
@@ -378,6 +380,7 @@
378380
'responses': [
379381
'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "IO[bytes]"',
380382
'"FileLike" has no attribute "closed"',
383+
'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "BinaryIO"',
381384
],
382385
'reverse_lookup': [
383386
"Cannot resolve keyword 'choice' into field"

scripts/tests_extension_hook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from pytest_mypy.collect import File
2-
from pytest_mypy.item import YamlTestItem
1+
from pytest_mypy_plugins.collect import File
2+
from pytest_mypy_plugins.item import YamlTestItem
33

44

55
def django_plugin_hook(test_item: YamlTestItem) -> None:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def find_stub_files(name: str) -> List[str]:
2121
readme = f.read()
2222

2323
dependencies = [
24-
'mypy>=0.770,<0.780',
24+
'mypy>=0.780,<0.790',
2525
'typing-extensions',
2626
'django',
2727
]

0 commit comments

Comments
 (0)