mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 00:03:16 +01:00
Mark siren/stt/todo method type hints as mandatory (#163265)
This commit is contained in:
@@ -2591,10 +2591,12 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="available_tones",
|
function_name="available_tones",
|
||||||
return_type=["dict[int, str]", "list[int | str]", None],
|
return_type=["dict[int, str]", "list[int | str]", None],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_features",
|
function_name="supported_features",
|
||||||
return_type="SirenEntityFeature",
|
return_type="SirenEntityFeature",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -2606,31 +2608,38 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_languages",
|
function_name="supported_languages",
|
||||||
return_type="list[str]",
|
return_type="list[str]",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_formats",
|
function_name="supported_formats",
|
||||||
return_type="list[AudioFormats]",
|
return_type="list[AudioFormats]",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_codecs",
|
function_name="supported_codecs",
|
||||||
return_type="list[AudioCodecs]",
|
return_type="list[AudioCodecs]",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_bit_rates",
|
function_name="supported_bit_rates",
|
||||||
return_type="list[AudioBitRates]",
|
return_type="list[AudioBitRates]",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_sample_rates",
|
function_name="supported_sample_rates",
|
||||||
return_type="list[AudioSampleRates]",
|
return_type="list[AudioSampleRates]",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="supported_channels",
|
function_name="supported_channels",
|
||||||
return_type="list[AudioChannels]",
|
return_type="list[AudioChannels]",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="async_process_audio_stream",
|
function_name="async_process_audio_stream",
|
||||||
arg_types={1: "SpeechMetadata", 2: "AsyncIterable[bytes]"},
|
arg_types={1: "SpeechMetadata", 2: "AsyncIterable[bytes]"},
|
||||||
return_type="SpeechResult",
|
return_type="SpeechResult",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -2674,6 +2683,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="todo_items",
|
function_name="todo_items",
|
||||||
return_type=["list[TodoItem]", None],
|
return_type=["list[TodoItem]", None],
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="async_create_todo_item",
|
function_name="async_create_todo_item",
|
||||||
@@ -2681,6 +2691,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
1: "TodoItem",
|
1: "TodoItem",
|
||||||
},
|
},
|
||||||
return_type="None",
|
return_type="None",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="async_update_todo_item",
|
function_name="async_update_todo_item",
|
||||||
@@ -2688,6 +2699,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
1: "TodoItem",
|
1: "TodoItem",
|
||||||
},
|
},
|
||||||
return_type="None",
|
return_type="None",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="async_delete_todo_items",
|
function_name="async_delete_todo_items",
|
||||||
@@ -2695,6 +2707,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
1: "list[str]",
|
1: "list[str]",
|
||||||
},
|
},
|
||||||
return_type="None",
|
return_type="None",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="async_move_todo_item",
|
function_name="async_move_todo_item",
|
||||||
@@ -2703,6 +2716,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
2: "str | None",
|
2: "str | None",
|
||||||
},
|
},
|
||||||
return_type="None",
|
return_type="None",
|
||||||
|
mandatory=True,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user