mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import io
|
||||
from _typeshed import ReadableBuffer, Self, StrOrBytesPath
|
||||
from typing import IO, Any, Mapping, Sequence, TextIO, overload
|
||||
from typing_extensions import Literal, final
|
||||
from typing_extensions import Literal, TypeAlias, final
|
||||
|
||||
__all__ = [
|
||||
"CHECK_NONE",
|
||||
@@ -42,12 +42,12 @@ __all__ = [
|
||||
"is_check_supported",
|
||||
]
|
||||
|
||||
_OpenBinaryWritingMode = Literal["w", "wb", "x", "xb", "a", "ab"]
|
||||
_OpenTextWritingMode = Literal["wt", "xt", "at"]
|
||||
_OpenBinaryWritingMode: TypeAlias = Literal["w", "wb", "x", "xb", "a", "ab"]
|
||||
_OpenTextWritingMode: TypeAlias = Literal["wt", "xt", "at"]
|
||||
|
||||
_PathOrFile = StrOrBytesPath | IO[bytes]
|
||||
_PathOrFile: TypeAlias = StrOrBytesPath | IO[bytes]
|
||||
|
||||
_FilterChain = Sequence[Mapping[str, Any]]
|
||||
_FilterChain: TypeAlias = Sequence[Mapping[str, Any]]
|
||||
|
||||
FORMAT_AUTO: Literal[0]
|
||||
FORMAT_XZ: Literal[1]
|
||||
|
||||
Reference in New Issue
Block a user