Oh, mypy...
parent
2ce8e06619
commit
12fa5542b1
|
@ -76,8 +76,8 @@ def get_console_log(level: str = None, name: str = None) -> logging.Logger:
|
||||||
log.setLevel(level.upper() if not isinstance(level, int) else level)
|
log.setLevel(level.upper() if not isinstance(level, int) else level)
|
||||||
|
|
||||||
if not any(
|
if not any(
|
||||||
handler.stream == sys.stderr for handler in log.handlers
|
handler.stream == sys.stderr # type: ignore
|
||||||
if getattr(handler, 'stream', None)
|
for handler in log.handlers if getattr(handler, 'stream', None)
|
||||||
):
|
):
|
||||||
handler = logging.StreamHandler()
|
handler = logging.StreamHandler()
|
||||||
formatter = colorlog.ColoredFormatter(
|
formatter = colorlog.ColoredFormatter(
|
||||||
|
|
Loading…
Reference in New Issue