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:
@@ -90,7 +90,7 @@ def _agent(name: str, desc: str, perm: str = "read") -> AgentConfig:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestCheckpoint1_OrderQueryRouting:
|
||||
class TestCheckpoint1OrderQueryRouting:
|
||||
"""Verify intent classifier routes order queries to order_lookup."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -161,7 +161,7 @@ class TestCheckpoint1_OrderQueryRouting:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestCheckpoint2_MultiIntentSequential:
|
||||
class TestCheckpoint2MultiIntentSequential:
|
||||
"""Verify multi-intent classified and hint injected for sequential execution."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -235,7 +235,7 @@ class TestCheckpoint2_MultiIntentSequential:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestCheckpoint3_AmbiguousClarification:
|
||||
class TestCheckpoint3AmbiguousClarification:
|
||||
"""Verify ambiguous messages trigger clarification prompt."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -263,7 +263,9 @@ class TestCheckpoint3_AmbiguousClarification:
|
||||
mock_classifier.classify = AsyncMock(return_value=ClassificationResult(
|
||||
intents=(),
|
||||
is_ambiguous=True,
|
||||
clarification_question="Could you please provide more details about what you need help with?",
|
||||
clarification_question=(
|
||||
"Could you please provide more details about what you need help with?"
|
||||
),
|
||||
))
|
||||
graph.intent_classifier = mock_classifier
|
||||
mock_registry = MagicMock()
|
||||
@@ -294,7 +296,7 @@ class TestCheckpoint3_AmbiguousClarification:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestCheckpoint4_InterruptTTLAutoCancel:
|
||||
class TestCheckpoint4InterruptTTLAutoCancel:
|
||||
"""Verify interrupt TTL expiration triggers auto-cancel and retry prompt."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -361,7 +363,7 @@ class TestCheckpoint4_InterruptTTLAutoCancel:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestCheckpoint5_WebhookEscalation:
|
||||
class TestCheckpoint5WebhookEscalation:
|
||||
"""Verify webhook escalation sends POST and retries on failure."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -442,7 +444,7 @@ class TestCheckpoint5_WebhookEscalation:
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestCheckpoint6_EcommerceTemplate:
|
||||
class TestCheckpoint6EcommerceTemplate:
|
||||
"""Verify e-commerce template loads with correct agents."""
|
||||
|
||||
def test_ecommerce_template_loads_4_agents(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user