Set all "strict" options explicitly
This commit is contained in:
parent
7e4fe464f6
commit
d9364eea9e
1 changed files with 24 additions and 0 deletions
|
|
@ -447,6 +447,9 @@ disallow_any_generics = true
|
|||
# Disallow functions with incomplete type annotations
|
||||
disallow_incomplete_defs = true
|
||||
|
||||
# Allow subclassing `Any` as long as the ORM models' `Base` is untyped
|
||||
disallow_subclassing_any = false
|
||||
|
||||
# Disallow calling functions without type annotations ...
|
||||
disallow_untyped_calls = true
|
||||
# ... except for libraries without type annotations
|
||||
|
|
@ -454,12 +457,33 @@ untyped_calls_exclude = [
|
|||
"folium",
|
||||
]
|
||||
|
||||
# Disallow decorators without type annotations
|
||||
disallow_untyped_decorators = true
|
||||
|
||||
# Disallow functions without type annotations (or incomplete annotations)
|
||||
disallow_untyped_defs = true
|
||||
|
||||
# Require an error code in all "# type: ignore" comments
|
||||
enable_error_code = ["ignore-without-code"]
|
||||
|
||||
# Check further edge cases that are rarely an issue in practice
|
||||
extra_checks = true
|
||||
|
||||
# Treat imported names as re-exported as long as some packages lack `__all__`
|
||||
no_implicit_reexport = false
|
||||
|
||||
# Disallow comparisons of non-overlapping types (e.g., `str` and `int`)
|
||||
strict_equality = true
|
||||
|
||||
# Report `t.cast()` calls that are not needed
|
||||
warn_redundant_casts = true
|
||||
|
||||
# Allow returning `Any` as long as the ORM models' relationships are untyped
|
||||
warn_return_any = false
|
||||
|
||||
# Report "[[tool.mypy.overrides]]" sections that match no module
|
||||
warn_unused_configs = true
|
||||
|
||||
# Report "# type: ignore" comments that are not needed anymore
|
||||
warn_unused_ignores = true
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue