Skip to content

Commit 950b447

Browse files
committed
shorten lines
1 parent 84a5909 commit 950b447

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.ci/metrics/metrics.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ class GaugeMetric:
6565
def buildkite_fetch_page_build_list(
6666
buildkite_token: str, after_cursor: str = None
6767
) -> list[dict[str, str]]:
68-
"""Fetches a page of the build list using the GraphQL BuildKite API. Returns the BUILDKITE_GRAPHQL_BUILDS_PER_PAGE last **finished** builds by default, or the BUILDKITE_GRAPHQL_BUILDS_PER_PAGE **finished** builds older than the one pointer by |cursor| if provided.
68+
"""Fetches a page of the build list using the GraphQL BuildKite API.
69+
Returns the BUILDKITE_GRAPHQL_BUILDS_PER_PAGE last **finished** builds by
70+
default, or the BUILDKITE_GRAPHQL_BUILDS_PER_PAGE **finished** builds
71+
older than the one pointer by |cursor| if provided.
6972
The |cursor| value is taken from the previous page returned by the API.
7073
7174
The returned data had the following format:
@@ -75,7 +78,7 @@ def buildkite_fetch_page_build_list(
7578
after_cursor: cursor after which to start the page fetch.
7679
7780
Returns:
78-
Returns most recents builds after cursor (if set) with the following format:
81+
The most recent builds after cursor (if set) with the following format:
7982
[
8083
{
8184
"cursor": <value>,
@@ -127,7 +130,8 @@ def buildkite_fetch_page_build_list(
127130

128131
def buildkite_get_build_info(build_number: str) -> dict:
129132
"""Returns all the info associated with the provided build number.
130-
Note: for unknown reasons, graphql returns no jobs for a given build, while this endpoint does, hence why this uses this API instead of graphql.
133+
Note: for unknown reasons, graphql returns no jobs for a given build,
134+
while this endpoint does, hence why this uses this API instead of graphql.
131135
132136
Args:
133137
build_number: which build number to fetch info for.
@@ -292,7 +296,8 @@ def get_sampled_workflow_metrics(github_repo: github.Repository):
292296
time.time_ns(),
293297
)
294298
)
295-
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
299+
# Always send a hearbeat metric so we can monitor is this container is
300+
# still able to log to Grafana.
296301
workflow_metrics.append(
297302
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
298303
)

0 commit comments

Comments
 (0)