mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use PEP 604 syntax wherever possible (#7493)
This commit is contained in:
@@ -2,7 +2,7 @@ import concurrent.futures
|
||||
import sys
|
||||
from collections.abc import Awaitable, Generator, Iterable, Iterator
|
||||
from types import FrameType
|
||||
from typing import Any, Coroutine, Generic, Optional, TextIO, TypeVar, Union, overload
|
||||
from typing import Any, Coroutine, Generic, TextIO, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .events import AbstractEventLoop
|
||||
@@ -56,8 +56,8 @@ _T3 = TypeVar("_T3")
|
||||
_T4 = TypeVar("_T4")
|
||||
_T5 = TypeVar("_T5")
|
||||
_FT = TypeVar("_FT", bound=Future[Any])
|
||||
_FutureT = Union[Future[_T], Generator[Any, None, _T], Awaitable[_T]]
|
||||
_TaskYieldType = Optional[Future[object]]
|
||||
_FutureT = Future[_T] | Generator[Any, None, _T] | Awaitable[_T]
|
||||
_TaskYieldType = Future[object] | None
|
||||
|
||||
FIRST_COMPLETED = concurrent.futures.FIRST_COMPLETED
|
||||
FIRST_EXCEPTION = concurrent.futures.FIRST_EXCEPTION
|
||||
|
||||
Reference in New Issue
Block a user