client_python
client_python copied to clipboard
Improve cyclomatic complexity
Hi! Using the example of my PR, I would like to show that the library needs to improve its cyclomatic complexity. I tested with the utility radon
My changes
SummaryMetricFamily.__init__ - B (7)
to
SummaryMetricFamily.__init__ - B (6)
HistogramMetricFamily - B(7)
to
Deleted from >=B level complexity
HistogramMetricFamily.__init__ - B(7)
to
HistogramMetricFamily.__init__ - B(6)
CollectorRegistry._get_names - B(7)
to
CollectorRegistry._get_names - B(6)
```
```
629 blocks (classes, functions, methods) analyzed.
Average complexity: A (2.1701112877583464)
to
629 blocks (classes, functions, methods) analyzed.
Average complexity: A (2.1701112877583464)
```