From 5ba4a35f27016a41124bf3f5d255224ec1b46eb6 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 14 Oct 2023 20:03:25 +0800 Subject: [PATCH] Fix | type mis match --- libs/utils/logger/formatter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/utils/logger/formatter.py b/libs/utils/logger/formatter.py index c09f09d..dc04816 100644 --- a/libs/utils/logger/formatter.py +++ b/libs/utils/logger/formatter.py @@ -36,7 +36,7 @@ class BaseFormatter(Options): def format(self, message: LogMessage) -> str: raise NotImplementedError(f'{self.__class__.__name__}.format is not implemented') - def _format(self, message: LogMessage) -> str: + def _format(self, message: LogMessage) -> LogMessage: """ Format message :param message: @@ -44,6 +44,7 @@ class BaseFormatter(Options): """ for formatter in self.sub_formatter: message = formatter._format(message) + return message class TimeFormatter(BaseFormatter):