Use PEP 604 syntax wherever possible (#7493)

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-03-16 16:01:33 +01:00
1 parent 15e21a8dc1
commit 3ab250eec8
174 files changed
+472 -490

No files matched your search

+3 -3
View File
@@ -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