Copilot commented on code in PR #1299:
URL:
https://github.com/apache/cassandra-python-driver/pull/1299#discussion_r3582682793
##########
cassandra/metrics.py:
##########
@@ -123,22 +123,22 @@ def __init__(self, cluster_proxy):
self.stats_name = 'cassandra-{0}'.format(str(self._stats_counter))
Metrics._stats_counter += 1
self.stats = scales.collection(self.stats_name,
- scales.PmfStat('request_timer'),
- scales.IntStat('connection_errors'),
- scales.IntStat('write_timeouts'),
- scales.IntStat('read_timeouts'),
- scales.IntStat('unavailables'),
- scales.IntStat('other_errors'),
- scales.IntStat('retries'),
- scales.IntStat('ignores'),
-
- # gauges
- scales.Stat('known_hosts',
- lambda: len(cluster_proxy.metadata.all_hosts())),
- scales.Stat('connected_to',
- lambda: len(set(chain.from_iterable(s._pools.keys() for s in
cluster_proxy.sessions)))),
- scales.Stat('open_connections',
- lambda: sum(sum(p.open_count for p in s._pools.values()) for s
in cluster_proxy.sessions)))
+ scales.PmfStat('request_timer'),
+ scales.IntStat('connection_errors'),
+ scales.IntStat('write_timeouts'),
+ scales.IntStat('read_timeouts'),
Review Comment:
The continuation indentation inside the scales.collection(...) call is
inconsistent (the "# gauges" block is indented differently than the preceding
arguments), which can trip indentation lint rules and hurts readability.
Consider using a standard hanging-indent style for the whole call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]