From 49c793b1a2a5e110b210d81729c18c1f5a419352 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 17 Aug 2022 18:44:08 +0200 Subject: [PATCH] Add scene checks to pylint plugin (#76908) --- pylint/plugins/hass_enforce_type_hints.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 7eb31eba523..99d06c380fd 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -1911,6 +1911,27 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { ], ), ], + "scene": [ + ClassTypeHintMatch( + base_class="Entity", + matches=_ENTITY_MATCH, + ), + ClassTypeHintMatch( + base_class="RestoreEntity", + matches=_RESTORE_ENTITY_MATCH, + ), + ClassTypeHintMatch( + base_class="Scene", + matches=[ + TypeHintMatch( + function_name="activate", + kwargs_type="Any", + return_type=None, + has_async_counterpart=True, + ), + ], + ), + ], "select": [ ClassTypeHintMatch( base_class="Entity",