fluent / fluent/fluent-logger-python
Use another augmented assignment statement
- Lingua principale
- Python
- Stelle
- 457
- Fork
- 138
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
: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:
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Refactoring
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100