Skip to content

Commit

Permalink
Update compatible-mypy to 1.4.x (#437)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
intgr authored Jun 27, 2023
1 parent 2827838 commit 180a5b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ check_untyped_defs = True
show_traceback = True
allow_redefinition = True
incremental = True
show_error_codes = False
disable_error_code = empty-body
# TODO: update our test error messages to match new mypy output
show_error_codes = False
force_uppercase_builtins = True
force_union_syntax = True

plugins =
mypy_django_plugin.main,
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ def find_stub_files(name: str) -> List[str]:
"types-PyYAML>=5.4.3",
]

# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)
extras_require = {
"compatible-mypy": ["mypy>=1.3.0,<1.4"],
"compatible-mypy": ["mypy==1.4.*"],
"coreapi": ["coreapi>=2.0.0"],
"markdown": ["types-Markdown>=0.1.5"],
}
Expand Down
5 changes: 4 additions & 1 deletion tests/plugins.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[mypy]
check_untyped_defs = True
show_error_codes = False
disable_error_code = empty-body
plugins =
mypy_django_plugin.main,
mypy_drf_plugin.main
# TODO: update our test error messages to match new mypy output
show_error_codes = False
force_uppercase_builtins = True
force_union_syntax = True

[mypy-coreapi]
ignore_missing_imports = True
Expand Down

0 comments on commit 180a5b1

Please sign in to comment.