client_python
client_python copied to clipboard
Increase the usage of augmented assignment statements
: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/prometheus_client/exposition.py b/prometheus_client/exposition.py
index e374144..1c10055 100644
--- a/prometheus_client/exposition.py
+++ b/prometheus_client/exposition.py
@@ -179,9 +179,9 @@ def generate_latest(registry=REGISTRY):
mtype = metric.type
# Munging from OpenMetrics into Prometheus format.
if mtype == 'counter':
- mname = mname + '_total'
+ mname += '_total'
elif mtype == 'info':
- mname = mname + '_info'
+ mname += '_info'
mtype = 'gauge'
elif mtype == 'stateset':
mtype = 'gauge'