Skip to content

Commit b134c36

Browse files
committed
fixing linter
1 parent 8e655d1 commit b134c36

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/a2a/server/apps/jsonrpc/jsonrpc_app.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,21 @@ class JSONRPCApplication(ABC):
156156
"""
157157

158158
# Method-to-model mapping for centralized routing
159-
METHOD_TO_MODEL = {
159+
# Define the union type for all supported request models
160+
A2ARequestModel = (
161+
SendMessageRequest
162+
| SendStreamingMessageRequest
163+
| GetTaskRequest
164+
| CancelTaskRequest
165+
| SetTaskPushNotificationConfigRequest
166+
| GetTaskPushNotificationConfigRequest
167+
| ListTaskPushNotificationConfigRequest
168+
| DeleteTaskPushNotificationConfigRequest
169+
| TaskResubscriptionRequest
170+
| GetAuthenticatedExtendedCardRequest
171+
)
172+
173+
METHOD_TO_MODEL: dict[str, type[A2ARequestModel]] = {
160174
'message/send': SendMessageRequest,
161175
'message/stream': SendStreamingMessageRequest,
162176
'tasks/get': GetTaskRequest,

0 commit comments

Comments
 (0)