fluent / fluent/fluent-logger-python

Use another augmented assignment statement

オープン
#181 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。