mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix google_tasks generic typing (#102778)
This commit is contained in:
parent
b83ada8c19
commit
4cac20f835
@ -16,7 +16,7 @@ UPDATE_INTERVAL: Final = datetime.timedelta(minutes=30)
|
||||
TIMEOUT = 10
|
||||
|
||||
|
||||
class TaskUpdateCoordinator(DataUpdateCoordinator):
|
||||
class TaskUpdateCoordinator(DataUpdateCoordinator[list[dict[str, Any]]]):
|
||||
"""Coordinator for fetching Google Tasks for a Task List form the API."""
|
||||
|
||||
def __init__(
|
||||
|
@ -58,7 +58,9 @@ async def async_setup_entry(
|
||||
)
|
||||
|
||||
|
||||
class GoogleTaskTodoListEntity(CoordinatorEntity, TodoListEntity):
|
||||
class GoogleTaskTodoListEntity(
|
||||
CoordinatorEntity[TaskUpdateCoordinator], TodoListEntity
|
||||
):
|
||||
"""A To-do List representation of the Shopping List."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
@ -89,7 +91,7 @@ class GoogleTaskTodoListEntity(CoordinatorEntity, TodoListEntity):
|
||||
summary=item["title"],
|
||||
uid=item["id"],
|
||||
status=TODO_STATUS_MAP.get(
|
||||
item.get("status"), TodoItemStatus.NEEDS_ACTION
|
||||
item.get("status"), TodoItemStatus.NEEDS_ACTION # type: ignore[arg-type]
|
||||
),
|
||||
)
|
||||
for item in self.coordinator.data
|
||||
|
Loading…
x
Reference in New Issue
Block a user