fix: ruff findings

This commit is contained in:
soubarna
2026-10-05 17:28:15 +05:30
parent 2c93874799
commit 3355c20202
44 changed files with 117 additions and 213 deletions
+4 -9
View File
@@ -10,10 +10,9 @@ Covers:
- AC78-5: Separate freshness, last outcome, boot enablement, activity facts
- AC78-6: 5s poll reevaluates freshness from cached clock
"""
import sqlite3
from datetime import datetime, timedelta, timezone
from pathlib import Path
from unittest.mock import patch, MagicMock
from unittest.mock import patch
import pytest
import sys
@@ -23,12 +22,9 @@ sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
from fenris.store import init_store
from fenris.status_composition import (
StatusState,
StatusComposition,
compose_status,
render_status_cli,
render_status_tui,
FRESH_THRESHOLD_S,
STALENESS_THRESHOLD_S,
)
@@ -682,7 +678,6 @@ class TestStoreFaultSuppression:
conn.close()
def test_newer_schema_suppresses_projection(self, tmp_path):
import fenris.store as store_mod
conn = init_store(tmp_path / "test.db")
now = _clock()
@@ -971,7 +966,7 @@ class TestTUIIntegration:
"last_collect_ok": True, "last_collect_age_s": 120,
"last_collect_reason": None,
}):
async with app.run_test() as pilot:
async with app.run_test():
strip = str(app.query_one("#service-strip").render())
assert "●" in strip
assert "Monitoring" in strip or "monitoring" in strip.lower()
@@ -997,7 +992,7 @@ class TestTUIIntegration:
"last_collect_ok": None, "last_collect_age_s": None,
"last_collect_reason": None,
}):
async with app.run_test() as pilot:
async with app.run_test():
strip = str(app.query_one("#service-strip").render())
# Should show Paused state
assert "‖" in strip or "Paused" in strip or "paused" in strip.lower()
@@ -1024,7 +1019,7 @@ class TestTUIIntegration:
"last_collect_ok": False, "last_collect_age_s": 60,
"last_collect_reason": "exit code 3",
}):
async with app.run_test() as pilot:
async with app.run_test():
strip = str(app.query_one("#service-strip").render())
# Should show Error state
assert "✖" in strip or "Error" in strip or "error" in strip.lower()