Skip to content

Commit 73847ea

Browse files
committed
Fix accidental namspace package
src/utils/agents was missing an __init__.py, making it a namepsace package. A side effect of this was it was being skipped by pylint. Change the namespace package to a package and address pylint failures.
1 parent 287072e commit 73847ea

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/utils/agents/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Agent helpers."""

src/utils/agents/streaming.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Agent streaming helpers for the streaming_query flow."""
22

3+
# pylint: disable=R0913,R0914, R0917
4+
35
from __future__ import annotations
46

57
import asyncio
@@ -406,7 +408,7 @@ def _process_token(
406408
def dispatch_stream_event(
407409
event: AgentDispatchEvent,
408410
_state: AgentTurnAccumulator,
409-
) -> Optional[StreamEventPayload]:
411+
) -> None:
410412
"""Map a pydantic-ai stream event to an SSE payload.
411413
412414
Args:
@@ -417,7 +419,6 @@ def dispatch_stream_event(
417419
None when the event does not map to an SSE payload.
418420
"""
419421
logger.debug("Ignoring event kind=%s", event.event_kind)
420-
return None
421422

422423

423424
@dispatch_stream_event.register

src/utils/agents/tool_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def summarize_native_tool_call(
101101
type="mcp_call",
102102
)
103103
case _:
104-
logger.warning(f"Unknown tool name: {part.tool_name}")
104+
logger.warning("Unknown tool name: %s", part.tool_name)
105105
return None
106106

107107

@@ -184,7 +184,7 @@ def process_native_tool_result(
184184
case tool_name if tool_name.startswith(_MCP_SERVER_TOOL_PREFIX):
185185
tool_result = summarize_mcp_tool_result(part, state.tool_round)
186186
case _:
187-
logger.warning(f"Unknown tool name: {part.tool_name}")
187+
logger.warning("Unknown tool name: %s", part.tool_name)
188188
return None
189189

190190
state.emitted_tool_result_ids.add(tool_result.id)

0 commit comments

Comments
 (0)