fix: resolve ruff lint errors in Phase 2 code

- Move intent imports to TYPE_CHECKING block in graph.py (TC001)
- Rename test classes to CapWords convention (N801)
- Fix line length violations across test files (E501)
- Auto-fix import sorting (I001)
This commit is contained in:
Yaojia Wang
2026-03-30 21:44:47 +02:00
parent b861ff055f
commit 006b4ee5d7
6 changed files with 40 additions and 20 deletions

View File

@@ -16,8 +16,10 @@ from app.intent import (
from app.registry import AgentConfig
def _make_agent(name: str, desc: str = "test", permission: str = "read") -> AgentConfig:
return AgentConfig(name=name, description=desc, permission=permission, tools=["fallback_respond"])
def _make_agent(name: str, desc: str = "test", perm: str = "read") -> AgentConfig:
return AgentConfig(
name=name, description=desc, permission=perm, tools=["fallback_respond"],
)
@pytest.mark.unit

View File

@@ -222,7 +222,9 @@ class TestHandleUserMessage:
im = InterruptManager()
sm.touch("t1")
await handle_user_message(ws, graph, sm, cb, "t1", "cancel order 1042", interrupt_manager=im)
await handle_user_message(
ws, graph, sm, cb, "t1", "cancel order 1042", interrupt_manager=im,
)
# Interrupt should be registered
assert im.has_pending("t1")