fix: resolve all Ruff linting errors

- Fix PLW2901: Use different variable name for stripped lines in loop
- Fix E721: Use 'is' instead of '==' for type comparisons
- Add noqa comments for intentional security warnings (S321, S507, S110, S603)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-13 16:12:39 +00:00
parent 7754d14050
commit b42c6f5f64
15 changed files with 49 additions and 55 deletions
-3
View File
@@ -240,7 +240,6 @@ class TestContainerInfoDetection:
@patch("builtins.open", new_callable=mock_open, read_data="12:docker:/abc123456789")
def test_extracts_container_id(self, mock_file, mock_exists):
"""Test extracts container ID from cgroup."""
from app.views.status import status_dashboard
mock_exists.return_value = True
@@ -250,7 +249,6 @@ class TestContainerInfoDetection:
@patch("app.views.status.os.path.exists")
def test_handles_missing_cgroup_file(self, mock_exists):
"""Test handles missing cgroup file gracefully."""
from app.views.status import status_dashboard
mock_exists.side_effect = [True, False] # Docker env exists, but cgroup doesn't
@@ -259,7 +257,6 @@ class TestContainerInfoDetection:
@patch("app.views.status.settings")
def test_includes_runtime_info_when_available(self, mock_settings):
"""Test includes runtime info when available."""
from app.views.status import status_dashboard
mock_settings.runtime_info = "Python 3.11.5 on Linux"