Correct the type annotation of abort

pull/24946/head
Lidi Zheng 4 years ago
parent befc7a7d4b
commit 45b4608a02
  1. 6
      src/python/grpcio/grpc/aio/_base_server.py

@ -169,8 +169,10 @@ class ServicerContext(Generic[RequestType, ResponseType], abc.ABC):
""" """
@abc.abstractmethod @abc.abstractmethod
async def abort(self, code: grpc.StatusCode, details: str, async def abort(self,
trailing_metadata: Metadata) -> None: code: grpc.StatusCode,
details: str = '',
trailing_metadata: Metadata = tuple()) -> None:
"""Raises an exception to terminate the RPC with a non-OK status. """Raises an exception to terminate the RPC with a non-OK status.
The code and details passed as arguments will supercede any existing The code and details passed as arguments will supercede any existing

Loading…
Cancel
Save