Skip to content

Commit 7b78d75

Browse files
committed
Typing fixes
1 parent 14cc937 commit 7b78d75

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/a2a/server/agent_execution/context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def context_id(self) -> str | None:
8282

8383
@property
8484
def configuration(self) -> MessageSendConfiguration | None:
85+
if not self._params:
86+
return None
8587
return self._params.configuration
8688

8789
def _check_or_generate_task_id(self) -> None:

src/a2a/server/tasks/task_updater.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import uuid
22

3+
from typing import Any
4+
35
from a2a.server.events import EventQueue
46
from a2a.types import (
57
Artifact,
@@ -42,7 +44,7 @@ def add_artifact(
4244
parts: list[Part],
4345
artifact_id=str(uuid.uuid4()),
4446
name: str | None = None,
45-
metadata: dict[str, any] | None = None,
47+
metadata: dict[str, Any] | None = None,
4648
):
4749
"""Add an artifact to the task."""
4850
self.event_queue.enqueue_event(

0 commit comments

Comments
 (0)