Use PEP 604 syntax wherever possible, part II (#7514)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2022-03-19 14:27:35 +00:00
committed by GitHub
parent 340c6c97ed
commit 1acc8f3bd6
55 changed files with 116 additions and 141 deletions

View File

@@ -6,7 +6,7 @@ from io import TextIOWrapper
from string import Template
from time import struct_time
from types import FrameType, TracebackType
from typing import Any, ClassVar, Generic, Optional, Pattern, TextIO, TypeVar, Union, overload
from typing import Any, ClassVar, Generic, Pattern, TextIO, TypeVar, Union, overload
from typing_extensions import Literal
__all__ = [
@@ -54,9 +54,9 @@ __all__ = [
"raiseExceptions",
]
_SysExcInfoType = Union[tuple[type[BaseException], BaseException, Optional[TracebackType]], tuple[None, None, None]]
_SysExcInfoType = Union[tuple[type[BaseException], BaseException, TracebackType | None], tuple[None, None, None]]
_ExcInfoType = None | bool | _SysExcInfoType | BaseException
_ArgsType = Union[tuple[object, ...], Mapping[str, object]]
_ArgsType = tuple[object, ...] | Mapping[str, object]
_FilterType = Filter | Callable[[LogRecord], int]
_Level = int | str
_FormatStyle = Literal["%", "{", "$"]