Skip to content

Commit ef103a5

Browse files
committed
expand one-liner
1 parent 73c67ea commit ef103a5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.ci/metrics/metrics.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,12 @@ def buildkite_get_builds_up_to(buildkite_token: str, last_cursor: str = None) ->
144144
return page
145145

146146
# Cursor has been provided, check if present in this page.
147-
match_index = next(
148-
(i for i, x in enumerate(page) if x["cursor"] == last_cursor), None
149-
)
147+
match_index = None
148+
for index, item in enumerate(page):
149+
if item["cursor"] == last_cursor:
150+
match_index = index
151+
break
152+
150153
# Not present, continue loading more pages.
151154
if match_index is None:
152155
output += page

0 commit comments

Comments
 (0)