mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Change the asyncio.Task constructor type (#10228)
This commit is contained in:
@@ -375,6 +375,8 @@ else:
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
_TaskCompatibleCoro: TypeAlias = Coroutine[Any, Any, _T_co]
|
||||
elif sys.version_info >= (3, 9):
|
||||
_TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Coroutine[Any, Any, _T_co]
|
||||
else:
|
||||
_TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Awaitable[_T_co]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user