fix: resolve 48 lint errors in test files

- Remove whitespace from 22 blank lines (W293)
- Remove 6 unused imports (F401): os, Mock, MagicMock, Path
- Add missing imports for 12 test functions (F821): sanitize_filename, extract_remote_path, MagicMock
- Fix 1 unsorted import block (I001)

All ruff checks now pass successfully.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-15 10:24:48 +00:00
parent bbb596dbd1
commit e24f83fdd0
11 changed files with 61 additions and 48 deletions
+6 -2
View File
@@ -242,7 +242,9 @@ class TestContainerInfoDetection:
@patch("app.views.status.os.path.exists")
@patch("builtins.open", side_effect=IOError("Permission denied"))
@pytest.mark.asyncio
async def test_handles_cgroup_read_error(self, mock_file, mock_exists, mock_settings, mock_templates, mock_providers):
async def test_handles_cgroup_read_error(
self, mock_file, mock_exists, mock_settings, mock_templates, mock_providers
):
"""Test handles cgroup file read errors."""
from app.views.status import status_dashboard
@@ -269,7 +271,9 @@ class TestContainerInfoDetection:
@patch("app.views.status.os.path.exists")
@patch("builtins.open", new_callable=mock_open, read_data="12:cpuset:/system.slice\n13:memory:/user.slice")
@pytest.mark.asyncio
async def test_handles_cgroup_without_docker(self, mock_file, mock_exists, mock_settings, mock_templates, mock_providers):
async def test_handles_cgroup_without_docker(
self, mock_file, mock_exists, mock_settings, mock_templates, mock_providers
):
"""Test handles cgroup without docker in path."""
from app.views.status import status_dashboard