Skip to content

Commit 180a5b1

Browse files
authored
Update compatible-mypy to 1.4.x (#437)
* Update compatible-mypy to 1.4.x * Add setup.py code comment & used simpler version dependency * Added settings force_uppercase_builtins and force_union_syntax to keep our tests passing without mass edits to test files.
1 parent 2827838 commit 180a5b1

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

mypy.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ check_untyped_defs = True
55
show_traceback = True
66
allow_redefinition = True
77
incremental = True
8-
show_error_codes = False
98
disable_error_code = empty-body
9+
# TODO: update our test error messages to match new mypy output
10+
show_error_codes = False
11+
force_uppercase_builtins = True
12+
force_union_syntax = True
1013

1114
plugins =
1215
mypy_django_plugin.main,

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def find_stub_files(name: str) -> List[str]:
2828
"types-PyYAML>=5.4.3",
2929
]
3030

31+
# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)
3132
extras_require = {
32-
"compatible-mypy": ["mypy>=1.3.0,<1.4"],
33+
"compatible-mypy": ["mypy==1.4.*"],
3334
"coreapi": ["coreapi>=2.0.0"],
3435
"markdown": ["types-Markdown>=0.1.5"],
3536
}

tests/plugins.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[mypy]
22
check_untyped_defs = True
3-
show_error_codes = False
43
disable_error_code = empty-body
54
plugins =
65
mypy_django_plugin.main,
76
mypy_drf_plugin.main
7+
# TODO: update our test error messages to match new mypy output
8+
show_error_codes = False
9+
force_uppercase_builtins = True
10+
force_union_syntax = True
811

912
[mypy-coreapi]
1013
ignore_missing_imports = True

0 commit comments

Comments
 (0)