Fix logging.getLevelName() type hints (#2730)

`logging.getLevelName()` can take either an `int` and returns a `str` or
a `str` and returns an `int` when the level name (`str`) or level
(`int`) is one of the registered log levels. If the value passed in
isn't one of the registered log levels, it returns the string `"level
%s" % lvl` where `lvl` is the value passed in to the function.
This commit is contained in:
Michael Noseworthy
2019-01-17 09:10:03 -03:30
committed by Sebastian Rittau
parent 78690405cf
commit e8c1111d13

View File

@@ -348,7 +348,7 @@ fatal = critical
def disable(lvl: int) -> None: ...
def addLevelName(lvl: int, levelName: str) -> None: ...
def getLevelName(lvl: int) -> str: ...
def getLevelName(lvl: Union[int, str]) -> Any: ...
def makeLogRecord(attrdict: Mapping[str, Any]) -> LogRecord: ...