feat: Add RESTful API Serving #1268
Annotations
12 errors and 10 notices
|
Lint Code Base
Process completed with exit code 1.
|
|
Lint Code Base:
src/a2a/server/apps/rest/rest_app.py#L203
Argument of type "(request: Unknown, context: ServerCallContext) -> AsyncIterable[str]" cannot be assigned to parameter "method" of type "(Unknown, ServerCallContext) -> AsyncIterator[str]" in function "_handle_streaming_request" (reportArgumentType)
|
|
Lint Code Base:
src/a2a/server/apps/rest/rest_app.py#L139
Argument of type "AsyncIterator[str]" cannot be assigned to parameter "stream" of type "AsyncGenerator[str, None]" in function "event_generator"
"AsyncIterator[str]" is incompatible with protocol "AsyncGenerator[str, None]"
"asend" is not present
"athrow" is not present
"aclose" is not present
"__anext__" is an incompatible type
Type "() -> Awaitable[str]" is not assignable to type "() -> Coroutine[Any, Any, _YieldT_co@AsyncGenerator]"
Function return type "Awaitable[str]" is incompatible with type "Coroutine[Any, Any, _YieldT_co@AsyncGenerator]" (reportArgumentType)
|
|
Lint Code Base:
src/a2a/server/apps/rest/rest_app.py#L105
Cannot access attribute "json" for class "Exception"
Attribute "json" is unknown (reportAttributeAccessIssue)
|
|
Lint Code Base:
src/a2a/client/rest_client.py#L771
Method "resubscribe" overrides class "Client" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, AsyncIterator[ClientEvent]]", override returns type "AsyncIterator[ClientEvent]"
"AsyncIterator[ClientEvent]" is not assignable to "CoroutineType[Any, Any, AsyncIterator[ClientEvent]]" (reportIncompatibleMethodOverride)
|
|
Lint Code Base:
src/a2a/client/rest_client.py#L605
Method "send_message" overrides class "Client" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, AsyncIterator[ClientEvent | Message]]", override returns type "AsyncIterator[Message | ClientEvent]"
"AsyncIterator[Message | ClientEvent]" is not assignable to "CoroutineType[Any, Any, AsyncIterator[ClientEvent | Message]]" (reportIncompatibleMethodOverride)
|
|
Lint Code Base:
src/a2a/client/optionals.py#L6
Type "type[grpc.aio.Channel]" is not assignable to declared type "type[a2a.client.optionals.Channel]"
"grpc.aio.Channel" is not assignable to "a2a.client.optionals.Channel"
Type "type[grpc.aio.Channel]" is not assignable to type "type[a2a.client.optionals.Channel]" (reportAssignmentType)
|
|
Lint Code Base:
src/a2a/client/jsonrpc_client.py#L782
Method "resubscribe" overrides class "Client" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, AsyncIterator[ClientEvent]]", override returns type "AsyncIterator[ClientEvent]"
"AsyncIterator[ClientEvent]" is not assignable to "CoroutineType[Any, Any, AsyncIterator[ClientEvent]]" (reportIncompatibleMethodOverride)
|
|
Lint Code Base:
src/a2a/client/jsonrpc_client.py#L588
Method "send_message" overrides class "Client" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, AsyncIterator[ClientEvent | Message]]", override returns type "AsyncIterator[ClientEvent | Message]"
"AsyncIterator[ClientEvent | Message]" is not assignable to "CoroutineType[Any, Any, AsyncIterator[ClientEvent | Message]]" (reportIncompatibleMethodOverride)
|
|
Lint Code Base:
src/a2a/client/grpc_client.py#L474
Method "resubscribe" overrides class "Client" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, AsyncIterator[ClientEvent]]", override returns type "AsyncIterator[ClientEvent]"
"AsyncIterator[ClientEvent]" is not assignable to "CoroutineType[Any, Any, AsyncIterator[ClientEvent]]" (reportIncompatibleMethodOverride)
|
|
Lint Code Base:
src/a2a/client/grpc_client.py#L312
Method "send_message" overrides class "Client" in an incompatible manner
Return type mismatch: base method returns type "CoroutineType[Any, Any, AsyncIterator[ClientEvent | Message]]", override returns type "AsyncIterator[ClientEvent | Message]"
"AsyncIterator[ClientEvent | Message]" is not assignable to "CoroutineType[Any, Any, AsyncIterator[ClientEvent | Message]]" (reportIncompatibleMethodOverride)
|
|
Lint Code Base
Process completed with exit code 1.
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L43
see src/a2a/client/jsonrpc_client.py (61-91)
|
|
Copy/pasted code:
src/a2a/client/jsonrpc_client.py#L61
see src/a2a/client/rest_client.py (43-72)
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L198
see src/a2a/client/rest_client.py (496-517)
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L496
see src/a2a/client/rest_client.py (198-219)
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L243
see src/a2a/client/rest_client.py (281-295)
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L281
see src/a2a/client/rest_client.py (243-257)
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L122
see src/a2a/client/rest_client.py (174-193)
|
|
Copy/pasted code:
src/a2a/client/rest_client.py#L174
see src/a2a/client/rest_client.py (122-140)
|
|
Copy/pasted code:
src/a2a/server/request_handlers/rest_handler.py#L161
see src/a2a/server/request_handlers/rest_handler.py (319-325)
|
|
Copy/pasted code:
src/a2a/server/request_handlers/rest_handler.py#L319
see src/a2a/server/request_handlers/rest_handler.py (161-169)
|