fluent / fluent/fluent-logger-python
Use another augmented assignment statement
- 主要言語
- Python
- スター
- 457
- フォーク
- 138
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
: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](https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements "Augmented assignment statements") accordingly.
```diff
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:
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start in fluent/handler.py at the FluentRecordFormatter formatting branch shown in the issue. Check the surrounding formatting behavior, make the augmented-assignment change while preserving the result, and verify the formatter still handles record dictionaries and missing keys as before.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- リファクタリング
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100