From 07c3c3bba8f3096dafdc6a17033de52d93b840fe Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 19 May 2025 11:56:05 +0200 Subject: [PATCH] Mark type hint as compulsory for entity.assumed_state property (#145187) --- homeassistant/components/raspyrfm/switch.py | 2 +- pylint/plugins/hass_enforce_type_hints.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/raspyrfm/switch.py b/homeassistant/components/raspyrfm/switch.py index b9506c3688c..a609ddb27d3 100644 --- a/homeassistant/components/raspyrfm/switch.py +++ b/homeassistant/components/raspyrfm/switch.py @@ -118,7 +118,7 @@ class RaspyRFMSwitch(SwitchEntity): return self._name @property - def assumed_state(self): + def assumed_state(self) -> bool: """Return True when the current state cannot be queried.""" return True diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 0e56e94d8cb..c5a79d166e2 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -707,6 +707,7 @@ _ENTITY_MATCH: list[TypeHintMatch] = [ TypeHintMatch( function_name="assumed_state", return_type="bool", + mandatory=True, ), TypeHintMatch( function_name="force_update",