1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 14:08:21 +00:00

Add todo component (#100019)

This commit is contained in:
Allen Porter
2023-10-23 13:53:00 -07:00
committed by GitHub
parent fa1df7e334
commit 5d430f53cd
16 changed files with 1908 additions and 31 deletions

View File

@@ -2428,6 +2428,54 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
],
),
],
"todo": [
ClassTypeHintMatch(
base_class="Entity",
matches=_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="RestoreEntity",
matches=_RESTORE_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="TodoListEntity",
matches=[
TypeHintMatch(
function_name="todo_items",
return_type=["list[TodoItem]", None],
),
TypeHintMatch(
function_name="async_create_todo_item",
arg_types={
1: "TodoItem",
},
return_type="None",
),
TypeHintMatch(
function_name="async_update_todo_item",
arg_types={
1: "TodoItem",
},
return_type="None",
),
TypeHintMatch(
function_name="async_delete_todo_items",
arg_types={
1: "list[str]",
},
return_type="None",
),
TypeHintMatch(
function_name="async_move_todo_item",
arg_types={
1: "str",
2: "int",
},
return_type="None",
),
],
),
],
"tts": [
ClassTypeHintMatch(
base_class="Provider",