diff --git a/pyproject.toml b/pyproject.toml index cc4d0e5..5f26c27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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