chore(lint): apply ruff --fix (4443 auto-fixes)

Auto-fixed categories:
- F401: unused imports removed
- I001: import blocks sorted
- W293: trailing whitespace stripped
- UP035: deprecated typing imports replaced
- SIM: simplify suggestions applied
- ARG: unused args prefixed with underscore
- T201: print statements removed
- F841: unused variables removed
- RUF059: unpacked variables prefixed

Remaining ~1500 unfixable errors (C901, B904, N806, E402) require manual work.

Backend smoke tests: 13/13 passed.
This commit is contained in:
2026-05-14 11:20:17 +03:00
parent a9a5eff518
commit c6189876b3
337 changed files with 4677 additions and 4515 deletions

View File

@@ -5,18 +5,19 @@
# @RELATION: VERIFIES -> src/core/logger.py
# @INVARIANT: All required log statements must correctly check the threshold.
import pytest
import logging
import pytest
from src.core.config_models import LoggingConfig
from src.core.logger import (
CotJsonFormatter,
belief_scope,
logger,
configure_logger,
get_task_log_level,
logger,
should_log_task_level,
CotJsonFormatter,
)
from src.core.config_models import LoggingConfig
@pytest.fixture(autouse=True)
@@ -101,9 +102,8 @@ def test_belief_scope_error_handling(caplog):
caplog.set_level("DEBUG")
with pytest.raises(ValueError):
with belief_scope("FailingFunction"):
raise ValueError("Something went wrong")
with pytest.raises(ValueError), belief_scope("FailingFunction"):
raise ValueError("Something went wrong")
# Check that an EXPLORE marker was emitted
explore_records = [
@@ -294,7 +294,6 @@ def test_enable_belief_state_flag(caplog):
def test_cot_json_formatter_output():
"""Test that CotJsonFormatter produces valid JSON with expected fields."""
import json
from datetime import datetime, timezone
formatter = CotJsonFormatter()