[mypy] plugins = pydantic.mypy warn_unreachable = true follow_imports = silent strict_optional = True warn_redundant_casts = True warn_unused_ignores = True disallow_any_generics = True check_untyped_defs = True no_implicit_reexport = True disallow_untyped_defs = True disallow_any_decorated = True disallow_any_expr = True disallow_any_explicit = True # The following should be set to True, but results in a Mypy crash # (https://github.com/python/mypy/issues/17954) disallow_any_unimported = False disallow_subclassing_any = True warn_return_any = True python_version = 3.10 # TODO: when we drop 3.9, drop the following line: force_union_syntax = True [pydantic-mypy] init_forbid_extra = True init_typed = True warn_required_dynamic_aliases = True [mypy-pydantic_core.*] follow_imports = skip