You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by gs...@apache.org on 2026/02/03 06:46:45 UTC
(steve) 01/04: cleaner to use next(iter())
This is an automated email from the ASF dual-hosted git repository.
gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git
commit e64c11511aa937b73f4a2905f83c7dc2afaded42
Author: Greg Stein <gs...@gmail.com>
AuthorDate: Tue Feb 3 00:41:34 2026 -0600
cleaner to use next(iter())
---
monitoring/stv_tool.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitoring/stv_tool.py b/monitoring/stv_tool.py
index 901c2fe..e25b130 100755
--- a/monitoring/stv_tool.py
+++ b/monitoring/stv_tool.py
@@ -502,7 +502,7 @@ def main(argv):
votes_by_label = read_jsonvotes(args.raw_file)
votes = [[labelmap[l.lower()] for l in vote.split()] for vote in votes_by_label]
else:
- newformat = (len(list(labelmap.keys())[0]) > 1) # keys like "a" or "aa"?
+ newformat = (len(next(iter(labelmap))) > 1) # keys like "a" or "aa"?
# votes_by_label: [ [L1, L2, ...], [ L1, L2, ... ], ... ]
votes_by_label = read_votefile(args.raw_file, newformat)
votes = [[labelmap[label] for label in votelist] for votelist in votes_by_label]