From 19b606841d4eb73184fcf0058abfc90e43064a30 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sun, 22 Feb 2026 21:44:53 +0100 Subject: [PATCH] Mark fan entity type hints as mandatory (#163789) --- pylint/plugins/hass_enforce_type_hints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index e76db49fe72..e4e0c9fd185 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -1597,6 +1597,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="percentage", return_type=["int", None], + mandatory=True, ), TypeHintMatch( function_name="speed_count", @@ -1611,10 +1612,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="current_direction", return_type=["str", None], + mandatory=True, ), TypeHintMatch( function_name="oscillating", return_type=["bool", None], + mandatory=True, ), TypeHintMatch( function_name="preset_mode", @@ -1624,6 +1627,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="preset_modes", return_type=["list[str]", None], + mandatory=True, ), TypeHintMatch( function_name="supported_features",