From 52b65868a4ea52f643def7e5859c0be3339e5c1d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:42:17 +0000 Subject: [PATCH] refactor: Address code review feedback - remove redundant imports and use _ for unused variables Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- app/views/files.py | 4 ++-- tests/test_file_status_fix.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/files.py b/app/views/files.py index 9560f966..61176d7f 100644 --- a/app/views/files.py +++ b/app/views/files.py @@ -375,12 +375,12 @@ def _compute_step_summary(logs): main_steps_seen[step_name] = (log.timestamp, status) # 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: main_counts[task_status] += 1 # 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: upload_counts[task_status] += 1 diff --git a/tests/test_file_status_fix.py b/tests/test_file_status_fix.py index 0a484b0d..b44ed09b 100644 --- a/tests/test_file_status_fix.py +++ b/tests/test_file_status_fix.py @@ -259,7 +259,6 @@ class TestMetricsCountingBugFixes: This test ensures the function correctly selects the latest status per step based on timestamp, not position in the list. """ - from datetime import datetime, timedelta class MockLog: def __init__(self, step_name, status, timestamp): @@ -299,7 +298,6 @@ class TestMetricsCountingBugFixes: This ensures the function truly is order-independent. """ - from datetime import datetime, timedelta class MockLog: def __init__(self, step_name, status, timestamp):