mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 10:21:14 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -4,7 +4,7 @@ from _typeshed import Self, StrOrBytesPath, StrPath
|
||||
from os import PathLike
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, Callable, Iterable, Iterator, Protocol, Sequence, overload
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
__all__ = [
|
||||
@@ -38,10 +38,10 @@ else:
|
||||
"LargeZipFile",
|
||||
]
|
||||
|
||||
_DateTuple = tuple[int, int, int, int, int, int]
|
||||
_ReadWriteMode = Literal["r", "w"]
|
||||
_ReadWriteBinaryMode = Literal["r", "w", "rb", "wb"]
|
||||
_ZipFileMode = Literal["r", "w", "x", "a"]
|
||||
_DateTuple: TypeAlias = tuple[int, int, int, int, int, int]
|
||||
_ReadWriteMode: TypeAlias = Literal["r", "w"]
|
||||
_ReadWriteBinaryMode: TypeAlias = Literal["r", "w", "rb", "wb"]
|
||||
_ZipFileMode: TypeAlias = Literal["r", "w", "x", "a"]
|
||||
|
||||
class BadZipFile(Exception): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user