From 1e8a8beef7332a6960c72c0ae1c78898592a7b00 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 15 Jan 2024 15:14:15 +0100 Subject: [PATCH] fix linting --- ansibledoctor/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansibledoctor/utils/__init__.py b/ansibledoctor/utils/__init__.py index 64cf0bb..3349f0b 100644 --- a/ansibledoctor/utils/__init__.py +++ b/ansibledoctor/utils/__init__.py @@ -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)