Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/a2a/server/tasks/task_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async def update_status(
message: Message | None = None,
final: bool = False,
timestamp: str | None = None,
metadata: dict[str, Any] | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The docstring for the update_status method should be updated to include a description for the new metadata parameter. This improves maintainability and helps other developers understand its purpose.

) -> None:
"""Updates the status of the task and publishes a `TaskStatusUpdateEvent`.

Expand All @@ -57,6 +58,7 @@ async def update_status(
message: An optional message associated with the status update.
final: If True, indicates this is the final status update for the task.
timestamp: Optional ISO 8601 datetime string. Defaults to current time.
metadata: Optional metadata for extensions.
"""
async with self._lock:
if self._terminal_state_reached:
Expand All @@ -77,6 +79,7 @@ async def update_status(
task_id=self.task_id,
context_id=self.context_id,
final=final,
metadata=metadata,
status=TaskStatus(
state=state,
message=message,
Expand Down
Loading