@@ -104,6 +104,7 @@ async def _get_task_store() -> TaskStore:
104104
105105 Returns:
106106 TaskStore instance based on configuration.
107+
107108 """
108109 global _TASK_STORE # pylint: disable=global-statement
109110 if _TASK_STORE is None :
@@ -116,6 +117,7 @@ async def _get_context_store() -> A2AContextStore:
116117
117118 Returns:
118119 A2AContextStore instance based on configuration.
120+
119121 """
120122 global _CONTEXT_STORE # pylint: disable=global-statement
121123 if _CONTEXT_STORE is None :
@@ -141,6 +143,7 @@ def _build_a2a_parts_from_agent_result(
141143
142144 Returns:
143145 List of A2A Part objects for the final artifact.
146+
144147 """
145148 if run_result is not None :
146149 final_text = run_result .response .text or "" .join (accumulated_text )
@@ -157,6 +160,7 @@ def _record_model_span(span: trace.Span, model_id: str) -> None:
157160 Parameters:
158161 span: The active OpenTelemetry span.
159162 model_id: Full model identifier in "provider/model" format.
163+
160164 """
161165 provider_id , bare_model_id = extract_provider_and_model_from_model_id (model_id )
162166 set_span_attributes (
@@ -183,6 +187,7 @@ def _record_execution_span(
183187 run_result: Completed agent run result, or None.
184188 compacted: Whether the turn used compacted conversation context.
185189 inference_time: Request processing duration in seconds.
190+
186191 """
187192 if tool_call_names :
188193 set_span_attributes (
@@ -234,6 +239,7 @@ async def _persist_compacted_a2a_turn(
234239 the request was served in compacted mode.
235240 agent: The pydantic-ai agent whose model captured the output items.
236241 task_id: A2A task identifier, used for error reporting.
242+
237243 """
238244 if not compaction .compacted or compaction .original_input is None :
239245 return
@@ -275,6 +281,7 @@ def process_event(
275281
276282 Args:
277283 event: The event to process
284+
278285 """
279286 if isinstance (event , TaskStatusUpdateEvent ):
280287 if event .status .state == TaskState .failed :
@@ -335,6 +342,7 @@ def __init__(
335342 auth_token: Authentication token for the request
336343 mcp_headers: MCP headers for context propagation
337344 request_headers: Incoming HTTP request headers for allowlist propagation
345+
338346 """
339347 self .auth_token : str = auth_token
340348 self .mcp_headers : McpHeaders = mcp_headers or {}
@@ -352,6 +360,7 @@ async def execute(
352360 Args:
353361 context: The request context containing user input and metadata
354362 event_queue: Queue for sending response events
363+
355364 """
356365 if not context .message :
357366 raise ValueError ("A2A request must have a message" )
@@ -406,6 +415,7 @@ async def _process_task_streaming( # pylint: disable=too-many-locals,too-many-s
406415 task_updater: Task updater for sending events
407416 task_id: The task ID to use for this execution
408417 context_id: The context ID to use for this execution
418+
409419 """
410420 if not task_id or not context_id :
411421 raise ValueError ("Task ID and Context ID are required" )
@@ -628,6 +638,7 @@ async def _convert_stream_to_events(
628638
629639 Yields:
630640 A2A events (TaskStatusUpdateEvent or TaskArtifactUpdateEvent)
641+
631642 """
632643 if not task_id or not context_id :
633644 raise ValueError ("Task ID and Context ID are required" )
@@ -686,6 +697,7 @@ def _dispatch_agent_event( # pylint: disable=too-many-arguments,too-many-positi
686697
687698 Returns:
688699 A2A TaskStatusUpdateEvent, or None if the event is not mapped.
700+
689701 """
690702 _ = artifact_id
691703
@@ -752,6 +764,7 @@ def _text_status_event(
752764
753765 Returns:
754766 TaskStatusUpdateEvent with the text delta.
767+
755768 """
756769 return TaskStatusUpdateEvent (
757770 task_id = task_id ,
@@ -781,6 +794,7 @@ async def cancel(
781794
782795 Raises:
783796 NotImplementedError: Task cancellation is not currently supported
797+
784798 """
785799 logger .info ("Cancellation requested but not currently supported" )
786800 raise NotImplementedError ("Task cancellation not currently supported" )
@@ -798,6 +812,7 @@ def get_lightspeed_agent_card() -> AgentCard:
798812
799813 Returns:
800814 AgentCard: The agent card describing Lightspeed's capabilities.
815+
801816 """
802817 # Get base URL from configuration or construct it
803818 service_config = configuration .service_configuration
@@ -922,6 +937,7 @@ async def _create_a2a_app(
922937
923938 Returns:
924939 A2A Starlette ASGI application
940+
925941 """
926942 agent_executor = A2AAgentExecutor (
927943 auth_token = auth_token ,
@@ -1061,6 +1077,7 @@ async def _handle_a2a_jsonrpc( # pylint: disable=too-many-locals,too-many-state
10611077
10621078 Returns:
10631079 JSON-RPC response or streaming response
1080+
10641081 """
10651082 logger .debug ("A2A endpoint called: %s %s" , request .method , request .url .path )
10661083
0 commit comments