From fb4c0b4b7ae16b389082e03fc83e14c3d80c519b Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:02:38 +0100 Subject: [PATCH] Enable error-code `redundant-self` [mypy 1.0] (#87602) --- mypy.ini | 2 +- script/hassfest/mypy_config.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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",