diff --git a/mypy.ini b/mypy.ini index fdbacd0c817..9e1b25d7ad4 100644 --- a/mypy.ini +++ b/mypy.ini @@ -14,7 +14,7 @@ warn_incomplete_stub = true warn_redundant_casts = true warn_unused_configs = true warn_unused_ignores = true -enable_error_code = ignore-without-code, truthy-iterable +enable_error_code = ignore-without-code, redundant-self, truthy-iterable disable_error_code = annotation-unchecked strict_concatenate = false check_untyped_defs = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index fa69a56f601..86565c9065c 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -48,7 +48,13 @@ GENERAL_SETTINGS: Final[dict[str, str]] = { "warn_redundant_casts": "true", "warn_unused_configs": "true", "warn_unused_ignores": "true", - "enable_error_code": ", ".join(["ignore-without-code", "truthy-iterable"]), + "enable_error_code": ", ".join( + [ + "ignore-without-code", + "redundant-self", + "truthy-iterable", + ] + ), "disable_error_code": ", ".join(["annotation-unchecked"]), # Strict_concatenate breaks passthrough ParamSpec typing "strict_concatenate": "false",