-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmypy.ini
More file actions
31 lines (29 loc) · 1 KB
/
mypy.ini
File metadata and controls
31 lines (29 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[mypy]
python_version = 3.10
files = app.py, api/, tests/
plugins = pydantic.mypy, strawberry.ext.mypy_plugin
warn_redundant_casts = True
warn_unused_ignores = True
disallow_any_generics = True
warn_return_any = True
check_untyped_defs = True
ignore_missing_imports = False
show_error_codes = True
strict_equality = True
explicit_package_bases = True
show_traceback = True
disallow_incomplete_defs = True
disallow_untyped_defs = True
# See https://github.com/python/mypy/issues/3905#issuecomment-421065323
# We don't want to ignore all missing imports as we want to catch those in our own code
# But for certain libraries they don't have a stub file
# Thus we only enforce import checking for our own libraries
# Another alternative is to listen out every single dependency that does not have a stub
[mypy-api.*]
ignore_missing_imports = False
[pydantic-mypy]
# See https://pydantic-docs.helpmanual.io/mypy_plugin/
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True
warn_untyped_fields = True