Oh, mypy...

loglevel_to_tractor_tests
Tyler Goodlet 2018-11-09 01:52:57 -05:00
parent 2ce8e06619
commit 12fa5542b1
1 changed files with 2 additions and 2 deletions

View File

@ -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(