From bd0ca8e661d750cf18aab0934c41cdfbdbfb7a73 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 1 Feb 2026 20:33:12 -0600 Subject: [PATCH] fix(#151): Fix linting violations in compaction tests Fixed code review findings: - Removed unused imports (MagicMock, ContextUsage) - Fixed import sorting violations All 41 tests still passing after fixes. --- apps/coordinator/tests/test_context_compaction.py | 8 ++++---- apps/coordinator/tests/test_context_monitor.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/coordinator/tests/test_context_compaction.py b/apps/coordinator/tests/test_context_compaction.py index 0573eb6..af7c761 100644 --- a/apps/coordinator/tests/test_context_compaction.py +++ b/apps/coordinator/tests/test_context_compaction.py @@ -6,11 +6,11 @@ Context compaction reduces memory usage by: 3. Measuring context reduction achieved """ -import pytest -from unittest.mock import AsyncMock, MagicMock +from unittest.mock import AsyncMock -from src.context_compaction import ContextCompactor, CompactionResult -from src.models import ContextUsage +import pytest + +from src.context_compaction import CompactionResult, ContextCompactor class TestContextCompactor: diff --git a/apps/coordinator/tests/test_context_monitor.py b/apps/coordinator/tests/test_context_monitor.py index e3e2f4d..cacfe6f 100644 --- a/apps/coordinator/tests/test_context_monitor.py +++ b/apps/coordinator/tests/test_context_monitor.py @@ -325,6 +325,7 @@ class TestContextMonitor: ) -> None: """Should perform compaction when COMPACT action is triggered.""" from unittest.mock import patch + from src.context_compaction import CompactionResult # Mock compaction result @@ -365,6 +366,7 @@ class TestContextMonitor: ) -> None: """Should log compaction metrics when compaction is performed.""" from unittest.mock import patch + from src.context_compaction import CompactionResult mock_compaction_result = CompactionResult( @@ -402,6 +404,7 @@ class TestContextMonitor: ) -> None: """Should handle compaction failure and log error.""" from unittest.mock import patch + from src.context_compaction import CompactionResult mock_compaction_result = CompactionResult(