mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Replace len by sum for generator
This commit is contained in:
parent
b44dadc5c6
commit
cfe6bc2cc5
@ -160,9 +160,7 @@ def handler(event: dict, context: Any) -> dict:
|
||||
steps = 0
|
||||
else:
|
||||
# We record only finished steps
|
||||
steps = len(
|
||||
[step for step in wf_job["steps"] if step["conclusion"] is not None]
|
||||
)
|
||||
steps = sum(1 for st in wf_job["steps"] if st["conclusion"] is not None)
|
||||
|
||||
workflow_job = WorkflowJob(
|
||||
wf_job["id"],
|
||||
|
Loading…
Reference in New Issue
Block a user