Fix util create_eager_task typing (#111976)

pull/112001/head
Marc Mueller 2024-03-01 21:04:45 +01:00 committed by GitHub
parent daf8d1939b
commit 16b162cd07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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,