From b19b085b2281e1cb42b814f4dbe8838d1b6db7b2 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 9 Sep 2022 07:00:41 +0000 Subject: [PATCH] Adjust pylint --- pylint/plugins/hass_enforce_type_hints.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 379c19b044d..33a8893bbdd 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -961,11 +961,11 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { ), TypeHintMatch( function_name="preset_mode", - return_type=["str", None], + return_type=["PresetMode", "str", None], ), TypeHintMatch( function_name="preset_modes", - return_type=["list[str]", None], + return_type=["list[PresetMode]", "list[str]", None], ), TypeHintMatch( function_name="is_aux_heat", @@ -973,19 +973,19 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { ), TypeHintMatch( function_name="fan_mode", - return_type=["str", None], + return_type=["FanMode", "str", None], ), TypeHintMatch( function_name="fan_modes", - return_type=["list[str]", None], + return_type=["list[FanMode]", "list[str]", None], ), TypeHintMatch( function_name="swing_mode", - return_type=["str", None], + return_type=["SwingMode", "str", None], ), TypeHintMatch( function_name="swing_modes", - return_type=["list[str]", None], + return_type=["list[SwingMode]", "list[str]", None], ), TypeHintMatch( function_name="set_temperature", @@ -1004,7 +1004,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="set_fan_mode", arg_types={ - 1: "str", + 1: "FanMode | str", }, return_type="None", has_async_counterpart=True, @@ -1020,7 +1020,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="set_swing_mode", arg_types={ - 1: "str", + 1: "SwingMode | str", }, return_type="None", has_async_counterpart=True, @@ -1028,7 +1028,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="set_preset_mode", arg_types={ - 1: "str", + 1: "PresetMode | str", }, return_type="None", has_async_counterpart=True,