From 0cb3ec142eee8beb488b575facc0f88369f43f85 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 22 Nov 2022 07:16:03 +0100 Subject: [PATCH] Enforce RemoteEntityFeature (#82463) --- homeassistant/components/remote/__init__.py | 4 ++-- pylint/plugins/hass_enforce_type_hints.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/remote/__init__.py b/homeassistant/components/remote/__init__.py index bc0711daeb5..17915e1be19 100644 --- a/homeassistant/components/remote/__init__.py +++ b/homeassistant/components/remote/__init__.py @@ -166,10 +166,10 @@ class RemoteEntity(ToggleEntity): entity_description: RemoteEntityDescription _attr_activity_list: list[str] | None = None _attr_current_activity: str | None = None - _attr_supported_features: RemoteEntityFeature | int = 0 + _attr_supported_features: RemoteEntityFeature = RemoteEntityFeature(0) @property - def supported_features(self) -> RemoteEntityFeature | int: + def supported_features(self) -> RemoteEntityFeature: """Flag supported features.""" return self._attr_supported_features diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 75a34d4e3b2..1974b789a83 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -2061,7 +2061,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { ), TypeHintMatch( function_name="supported_features", - return_type=["RemoteEntityFeature", "int"], + return_type="RemoteEntityFeature", ), TypeHintMatch( function_name="send_command",