fix linting

This commit is contained in:
Robert Kaussow 2024-01-15 15:14:15 +01:00 committed by renovate[bot]
parent c124460c11
commit 1e8a8beef7
1 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ class LogFilter:
class MultilineFormatter(logging.Formatter):
"""Reset color after newline characters."""
def format(self, record): # noqa
def format(self, record):
record.msg = record.msg.strip().replace("\n", f"\n{colorama.Style.RESET_ALL}... ")
return logging.Formatter.format(self, record)
@ -136,7 +136,7 @@ class MultilineFormatter(logging.Formatter):
class MultilineJsonFormatter(jsonlogger.JsonFormatter):
"""Remove newline characters."""
def format(self, record): # noqa
def format(self, record):
record.msg = record.msg.replace("\n", " ")
return jsonlogger.JsonFormatter.format(self, record)