From 16b162cd0763deeef825e00017fab7aec801863a Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:04:45 +0100 Subject: [PATCH] Fix util create_eager_task typing (#111976) --- homeassistant/util/async_.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/util/async_.py b/homeassistant/util/async_.py index 36589e01d65..304f2446722 100644 --- a/homeassistant/util/async_.py +++ b/homeassistant/util/async_.py @@ -2,7 +2,7 @@ from __future__ import annotations from asyncio import AbstractEventLoop, Future, Semaphore, Task, gather, get_running_loop -from collections.abc import Awaitable, Callable +from collections.abc import Awaitable, Callable, Coroutine import concurrent.futures from contextlib import suppress import functools @@ -26,7 +26,7 @@ _Ts = TypeVarTuple("_Ts") if sys.version_info >= (3, 12, 0): def create_eager_task( - coro: Awaitable[_T], + coro: Coroutine[Any, Any, _T], *, name: str | None = None, loop: AbstractEventLoop | None = None, @@ -41,7 +41,7 @@ if sys.version_info >= (3, 12, 0): else: def create_eager_task( - coro: Awaitable[_T], + coro: Coroutine[Any, Any, _T], *, name: str | None = None, loop: AbstractEventLoop | None = None,