2022-10-23 09:15:09 +00:00
|
|
|
from logging import Filter, LogRecord
|
2022-09-08 01:08:37 +00:00
|
|
|
from pathlib import Path
|
|
|
|
from types import TracebackType
|
2022-10-23 09:15:09 +00:00
|
|
|
from typing import Any, Callable, Dict, Optional, Tuple, Type, Union
|
2022-09-17 16:28:51 +00:00
|
|
|
|
|
|
|
from httpx import URL
|
2022-09-08 01:08:37 +00:00
|
|
|
|
2022-10-23 09:15:09 +00:00
|
|
|
__all__ = [
|
|
|
|
"StrOrPath",
|
|
|
|
"StrOrURL",
|
|
|
|
"StrOrInt",
|
|
|
|
"SysExcInfoType",
|
|
|
|
"ExceptionInfoType",
|
|
|
|
"JSONDict",
|
|
|
|
"JSONType",
|
|
|
|
"LogFilterType",
|
|
|
|
]
|
2022-09-08 01:08:37 +00:00
|
|
|
|
|
|
|
StrOrPath = Union[str, Path]
|
2022-09-17 16:28:51 +00:00
|
|
|
StrOrURL = Union[str, URL]
|
2022-10-07 05:02:49 +00:00
|
|
|
StrOrInt = Union[str, int]
|
|
|
|
|
2022-09-10 14:46:08 +00:00
|
|
|
SysExcInfoType = Union[Tuple[Type[BaseException], BaseException, Optional[TracebackType]], Tuple[None, None, None]]
|
|
|
|
ExceptionInfoType = Union[bool, SysExcInfoType, BaseException]
|
2022-09-08 01:08:37 +00:00
|
|
|
JSONDict = Dict[str, Any]
|
2022-10-07 05:02:49 +00:00
|
|
|
JSONType = Union[JSONDict, list]
|
2022-10-23 09:15:09 +00:00
|
|
|
|
|
|
|
LogFilterType = Union[Filter, Callable[[LogRecord], int]]
|