diff --git a/src/python/grpcio/grpc/aio/_interceptor.py b/src/python/grpcio/grpc/aio/_interceptor.py index 953ed2d18b7..dc750926df8 100644 --- a/src/python/grpcio/grpc/aio/_interceptor.py +++ b/src/python/grpcio/grpc/aio/_interceptor.py @@ -741,7 +741,7 @@ class InterceptedUnaryStreamCall( # pylint: disable=too-many-arguments async def _invoke( self, - interceptors: Sequence[UnaryUnaryClientInterceptor], + interceptors: Sequence[UnaryStreamClientInterceptor], method: bytes, timeout: Optional[float], metadata: Optional[Metadata], @@ -757,7 +757,7 @@ class InterceptedUnaryStreamCall( interceptors: List[UnaryStreamClientInterceptor], client_call_details: ClientCallDetails, request: RequestType, - ) -> _base_call.UnaryUnaryCall: + ) -> _base_call.UnaryStreamCall: if interceptors: continuation = functools.partial( _run_interceptor, interceptors[1:] @@ -874,7 +874,7 @@ class InterceptedStreamUnaryCall( """Run the RPC call wrapped in interceptors""" async def _run_interceptor( - interceptors: Iterator[UnaryUnaryClientInterceptor], + interceptors: Iterator[StreamUnaryClientInterceptor], client_call_details: ClientCallDetails, request_iterator: RequestIterableType, ) -> _base_call.StreamUnaryCall: @@ -921,7 +921,9 @@ class InterceptedStreamStreamCall( _loop: asyncio.AbstractEventLoop _channel: cygrpc.AioChannel - _last_returned_call_from_interceptors = Optional[_base_call.UnaryStreamCall] + _last_returned_call_from_interceptors = Optional[ + _base_call.StreamStreamCall + ] # pylint: disable=too-many-arguments def __init__(