mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -7,7 +7,7 @@ from string import Template
|
||||
from time import struct_time
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, ClassVar, Generic, Pattern, TextIO, TypeVar, Union, overload
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"BASIC_FORMAT",
|
||||
@@ -54,12 +54,12 @@ __all__ = [
|
||||
"raiseExceptions",
|
||||
]
|
||||
|
||||
_SysExcInfoType = Union[tuple[type[BaseException], BaseException, TracebackType | None], tuple[None, None, None]]
|
||||
_ExcInfoType = None | bool | _SysExcInfoType | BaseException
|
||||
_ArgsType = tuple[object, ...] | Mapping[str, object]
|
||||
_FilterType = Filter | Callable[[LogRecord], int]
|
||||
_Level = int | str
|
||||
_FormatStyle = Literal["%", "{", "$"]
|
||||
_SysExcInfoType: TypeAlias = Union[tuple[type[BaseException], BaseException, TracebackType | None], tuple[None, None, None]]
|
||||
_ExcInfoType: TypeAlias = None | bool | _SysExcInfoType | BaseException
|
||||
_ArgsType: TypeAlias = tuple[object, ...] | Mapping[str, object]
|
||||
_FilterType: TypeAlias = Filter | Callable[[LogRecord], int]
|
||||
_Level: TypeAlias = int | str
|
||||
_FormatStyle: TypeAlias = Literal["%", "{", "$"]
|
||||
|
||||
raiseExceptions: bool
|
||||
logThreads: bool
|
||||
|
||||
Reference in New Issue
Block a user