Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use another augmented assignment statement #181

Open
elfring opened this issue Nov 13, 2021 · 1 comment
Open

Use another augmented assignment statement #181

elfring opened this issue Nov 13, 2021 · 1 comment

Comments

@elfring
Copy link

elfring commented Nov 13, 2021

👀 Some source code analysis tools can help to find opportunities for improving software components.
💭 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:
@arcivanov
Copy link
Member

Noted, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants