diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index da31c415828..08ae1ac3767 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -2591,10 +2591,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="available_tones", return_type=["dict[int, str]", "list[int | str]", None], + mandatory=True, ), TypeHintMatch( function_name="supported_features", return_type="SirenEntityFeature", + mandatory=True, ), ], ), @@ -2606,31 +2608,38 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="supported_languages", return_type="list[str]", + mandatory=True, ), TypeHintMatch( function_name="supported_formats", return_type="list[AudioFormats]", + mandatory=True, ), TypeHintMatch( function_name="supported_codecs", return_type="list[AudioCodecs]", + mandatory=True, ), TypeHintMatch( function_name="supported_bit_rates", return_type="list[AudioBitRates]", + mandatory=True, ), TypeHintMatch( function_name="supported_sample_rates", return_type="list[AudioSampleRates]", + mandatory=True, ), TypeHintMatch( function_name="supported_channels", return_type="list[AudioChannels]", + mandatory=True, ), TypeHintMatch( function_name="async_process_audio_stream", arg_types={1: "SpeechMetadata", 2: "AsyncIterable[bytes]"}, return_type="SpeechResult", + mandatory=True, ), ], ), @@ -2674,6 +2683,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { TypeHintMatch( function_name="todo_items", return_type=["list[TodoItem]", None], + mandatory=True, ), TypeHintMatch( function_name="async_create_todo_item", @@ -2681,6 +2691,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 1: "TodoItem", }, return_type="None", + mandatory=True, ), TypeHintMatch( function_name="async_update_todo_item", @@ -2688,6 +2699,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 1: "TodoItem", }, return_type="None", + mandatory=True, ), TypeHintMatch( function_name="async_delete_todo_items", @@ -2695,6 +2707,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 1: "list[str]", }, return_type="None", + mandatory=True, ), TypeHintMatch( function_name="async_move_todo_item", @@ -2703,6 +2716,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { 2: "str | None", }, return_type="None", + mandatory=True, ), ], ),