mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Remove some spurious version checks in logging (#3292)
PR #3269 added some version checks for the argument type to setLevel and the existence of NullHandler. While these features weren't present in early versions of Python 3, they *are* present in Python 2.7, which leads to false positives.
This commit is contained in:
committed by
Sebastian Rittau
parent
455f25a5c7
commit
eeb8daa467
@@ -18,10 +18,7 @@ else:
|
||||
_ExcInfoType = Union[None, bool, _SysExcInfoType]
|
||||
_ArgsType = Union[Tuple[Any, ...], Mapping[str, Any]]
|
||||
_FilterType = Union[Filter, Callable[[LogRecord], int]]
|
||||
if sys.version_info >= (3, 2):
|
||||
_Level = Union[int, Text]
|
||||
else:
|
||||
_Level = int
|
||||
_Level = Union[int, Text]
|
||||
if sys.version_info >= (3, 6):
|
||||
from os import PathLike
|
||||
_Path = Union[str, PathLike[str]]
|
||||
@@ -403,8 +400,7 @@ class FileHandler(StreamHandler):
|
||||
encoding: Optional[str] = ..., delay: bool = ...) -> None: ...
|
||||
|
||||
|
||||
if sys.version_info >= (3, 1):
|
||||
class NullHandler(Handler): ...
|
||||
class NullHandler(Handler): ...
|
||||
|
||||
|
||||
class PlaceHolder:
|
||||
|
||||
Reference in New Issue
Block a user