fluent-logger-python icon indicating copy to clipboard operation
fluent-logger-python copied to clipboard

Use another augmented assignment statement

Open elfring opened this issue 4 years ago • 1 comments

:eyes: Some source code analysis tools can help to find opportunities for improving software components. :thought_balloon: I propose to increase the usage of augmented assignment statements accordingly.

diff --git a/fluent/handler.py b/fluent/handler.py
index 7aefd8f..46fcce9 100644
--- a/fluent/handler.py
+++ b/fluent/handler.py
@@ -147,7 +147,7 @@ class FluentRecordFormatter(logging.Formatter, object):
                 if self.__style:
                     value = self.__style(value).format(record)
                 else:
-                    value = value % record.__dict__
+                    value %= record.__dict__
             except KeyError as exc:
                 value = None
                 if not self.fill_missing_fmt_key:

elfring avatar Nov 13 '21 12:11 elfring

Noted, thank you.

arcivanov avatar Nov 15 '21 18:11 arcivanov