forked from modern-python/litestar-sqlalchemy-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmypy.ini
46 lines (31 loc) · 1.19 KB
/
mypy.ini
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[mypy]
# Common settings
python_version = 3.8
ignore_missing_imports = True
follow_imports = silent
pretty = True
exclude = (tests|migrations|venv*)/$
# Rules
## Disallows defining functions with incomplete type annotations
disallow_incomplete_defs = True
## Changes the treatment of arguments with a default value of `None` by not implicitly making their type `Optional`
no_implicit_optional = True
## Enables or disables strict Optional checks. If `False`, mypy treats `None` as compatible with every type
strict_optional = True
## Warns about casting an expression to its inferred type
warn_redundant_casts = True
## Warns about unneeded `# type: ignore` comments
warn_unused_ignores = True
## Shows errors for missing return statements on some execution paths
warn_no_return = True
## Shows a warning when encountering any code inferred to be unreachable or redundant after performing type analysis
warn_unreachable = True
## Prohibit equality checks, identity checks, and container checks between non-overlapping types.
strict_equality = True
# Plugin settings
# TODO uncomment
# plugins = pydantic.mypy
[pydantic-mypy]
warn_required_dynamic_aliases = True
warn_untyped_fields = True
init_typed = True