Use PEP 604 syntax wherever possible (#7493)

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

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import structseq
from typing import Any, Protocol, Union
from typing import Any, Protocol
from typing_extensions import Literal, final
_TimeTuple = tuple[int, int, int, int, int, int, int, int, int]
@@ -37,7 +37,7 @@ if sys.version_info >= (3, 9) and sys.platform == "linux":
# even if an iterable with length >9 is passed.
# https://github.com/python/typeshed/pull/6560#discussion_r767162532
@final
class struct_time(structseq[Union[Any, int]], _TimeTuple):
class struct_time(structseq[Any | int], _TimeTuple):
@property
def tm_year(self) -> int: ...
@property