refactor: Address code review feedback - remove redundant imports and use _ for unused variables
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -375,12 +375,12 @@ def _compute_step_summary(logs):
|
|||||||
main_steps_seen[step_name] = (log.timestamp, status)
|
main_steps_seen[step_name] = (log.timestamp, status)
|
||||||
|
|
||||||
# Count main step statuses from latest status per step
|
# Count main step statuses from latest status per step
|
||||||
for timestamp, task_status in main_steps_seen.values():
|
for _, task_status in main_steps_seen.values():
|
||||||
if task_status in main_counts:
|
if task_status in main_counts:
|
||||||
main_counts[task_status] += 1
|
main_counts[task_status] += 1
|
||||||
|
|
||||||
# Count upload task statuses from latest status per task
|
# Count upload task statuses from latest status per task
|
||||||
for timestamp, task_status in upload_tasks_seen.values():
|
for _, task_status in upload_tasks_seen.values():
|
||||||
if task_status in upload_counts:
|
if task_status in upload_counts:
|
||||||
upload_counts[task_status] += 1
|
upload_counts[task_status] += 1
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,6 @@ class TestMetricsCountingBugFixes:
|
|||||||
This test ensures the function correctly selects the latest status per step
|
This test ensures the function correctly selects the latest status per step
|
||||||
based on timestamp, not position in the list.
|
based on timestamp, not position in the list.
|
||||||
"""
|
"""
|
||||||
from datetime import datetime, timedelta
|
|
||||||
|
|
||||||
class MockLog:
|
class MockLog:
|
||||||
def __init__(self, step_name, status, timestamp):
|
def __init__(self, step_name, status, timestamp):
|
||||||
@@ -299,7 +298,6 @@ class TestMetricsCountingBugFixes:
|
|||||||
|
|
||||||
This ensures the function truly is order-independent.
|
This ensures the function truly is order-independent.
|
||||||
"""
|
"""
|
||||||
from datetime import datetime, timedelta
|
|
||||||
|
|
||||||
class MockLog:
|
class MockLog:
|
||||||
def __init__(self, step_name, status, timestamp):
|
def __init__(self, step_name, status, timestamp):
|
||||||
|
|||||||
Reference in New Issue
Block a user