Skip to content

Commit 15bfc60

Browse files
committed
Format types
1 parent 9438bcd commit 15bfc60

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

src/a2a/types.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ class AgentSkill(A2ABaseModel):
133133
"""
134134
Supported media types for output.
135135
"""
136-
tags: list[str] = Field(..., examples=[['cooking', 'customer support', 'billing']])
136+
tags: list[str] = Field(
137+
..., examples=[['cooking', 'customer support', 'billing']]
138+
)
137139
"""
138140
Set of tagwords describing classes of capabilities for this specific skill.
139141
"""
@@ -1271,7 +1273,9 @@ class Artifact(A2ABaseModel):
12711273

12721274

12731275
class DeleteTaskPushNotificationConfigResponse(
1274-
RootModel[JSONRPCErrorResponse | DeleteTaskPushNotificationConfigSuccessResponse]
1276+
RootModel[
1277+
JSONRPCErrorResponse | DeleteTaskPushNotificationConfigSuccessResponse
1278+
]
12751279
):
12761280
root: JSONRPCErrorResponse | DeleteTaskPushNotificationConfigSuccessResponse
12771281
"""
@@ -1280,7 +1284,9 @@ class DeleteTaskPushNotificationConfigResponse(
12801284

12811285

12821286
class GetTaskPushNotificationConfigResponse(
1283-
RootModel[JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse]
1287+
RootModel[
1288+
JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse
1289+
]
12841290
):
12851291
root: JSONRPCErrorResponse | GetTaskPushNotificationConfigSuccessResponse
12861292
"""
@@ -1289,7 +1295,9 @@ class GetTaskPushNotificationConfigResponse(
12891295

12901296

12911297
class ListTaskPushNotificationConfigResponse(
1292-
RootModel[JSONRPCErrorResponse | ListTaskPushNotificationConfigSuccessResponse]
1298+
RootModel[
1299+
JSONRPCErrorResponse | ListTaskPushNotificationConfigSuccessResponse
1300+
]
12931301
):
12941302
root: JSONRPCErrorResponse | ListTaskPushNotificationConfigSuccessResponse
12951303
"""
@@ -1444,7 +1452,9 @@ class SendStreamingMessageRequest(A2ABaseModel):
14441452

14451453

14461454
class SetTaskPushNotificationConfigResponse(
1447-
RootModel[JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse]
1455+
RootModel[
1456+
JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse
1457+
]
14481458
):
14491459
root: JSONRPCErrorResponse | SetTaskPushNotificationConfigSuccessResponse
14501460
"""
@@ -1497,7 +1507,9 @@ class TaskStatus(A2ABaseModel):
14971507
Additional status updates for client
14981508
"""
14991509
state: TaskState
1500-
timestamp: str | None = Field(default=None, examples=['2023-10-27T10:00:00Z'])
1510+
timestamp: str | None = Field(
1511+
default=None, examples=['2023-10-27T10:00:00Z']
1512+
)
15011513
"""
15021514
ISO 8601 datetime string when the status was recorded.
15031515
"""
@@ -1757,7 +1769,9 @@ class SendStreamingMessageSuccessResponse(A2ABaseModel):
17571769
"""
17581770

17591771

1760-
class CancelTaskResponse(RootModel[JSONRPCErrorResponse | CancelTaskSuccessResponse]):
1772+
class CancelTaskResponse(
1773+
RootModel[JSONRPCErrorResponse | CancelTaskSuccessResponse]
1774+
):
17611775
root: JSONRPCErrorResponse | CancelTaskSuccessResponse
17621776
"""
17631777
JSON-RPC response for the 'tasks/cancel' method.
@@ -1800,7 +1814,9 @@ class JSONRPCResponse(
18001814
"""
18011815

18021816

1803-
class SendMessageResponse(RootModel[JSONRPCErrorResponse | SendMessageSuccessResponse]):
1817+
class SendMessageResponse(
1818+
RootModel[JSONRPCErrorResponse | SendMessageSuccessResponse]
1819+
):
18041820
root: JSONRPCErrorResponse | SendMessageSuccessResponse
18051821
"""
18061822
JSON-RPC response model for the 'message/send' method.

0 commit comments

Comments
 (0)