mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix util create_eager_task typing (#111976)
This commit is contained in:
parent
daf8d1939b
commit
16b162cd07
@ -2,7 +2,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from asyncio import AbstractEventLoop, Future, Semaphore, Task, gather, get_running_loop
|
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
|
import concurrent.futures
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
import functools
|
import functools
|
||||||
@ -26,7 +26,7 @@ _Ts = TypeVarTuple("_Ts")
|
|||||||
if sys.version_info >= (3, 12, 0):
|
if sys.version_info >= (3, 12, 0):
|
||||||
|
|
||||||
def create_eager_task(
|
def create_eager_task(
|
||||||
coro: Awaitable[_T],
|
coro: Coroutine[Any, Any, _T],
|
||||||
*,
|
*,
|
||||||
name: str | None = None,
|
name: str | None = None,
|
||||||
loop: AbstractEventLoop | None = None,
|
loop: AbstractEventLoop | None = None,
|
||||||
@ -41,7 +41,7 @@ if sys.version_info >= (3, 12, 0):
|
|||||||
else:
|
else:
|
||||||
|
|
||||||
def create_eager_task(
|
def create_eager_task(
|
||||||
coro: Awaitable[_T],
|
coro: Coroutine[Any, Any, _T],
|
||||||
*,
|
*,
|
||||||
name: str | None = None,
|
name: str | None = None,
|
||||||
loop: AbstractEventLoop | None = None,
|
loop: AbstractEventLoop | None = None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user