Fix | type mis match

This commit is contained in:
shenjack 2023-10-14 20:03:25 +08:00
parent 276c5b932a
commit 5ba4a35f27
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -36,7 +36,7 @@ class BaseFormatter(Options):
def format(self, message: LogMessage) -> str: def format(self, message: LogMessage) -> str:
raise NotImplementedError(f'{self.__class__.__name__}.format is not implemented') raise NotImplementedError(f'{self.__class__.__name__}.format is not implemented')
def _format(self, message: LogMessage) -> str: def _format(self, message: LogMessage) -> LogMessage:
""" """
Format message Format message
:param message: :param message:
@ -44,6 +44,7 @@ class BaseFormatter(Options):
""" """
for formatter in self.sub_formatter: for formatter in self.sub_formatter:
message = formatter._format(message) message = formatter._format(message)
return message
class TimeFormatter(BaseFormatter): class TimeFormatter(BaseFormatter):