Merge pull request #24946 from lidizheng/abort-annotation

[Aio] Correct type annotation of grpc.aio.ServicerContext.abort
pull/24954/head
Lidi Zheng 4 years ago committed by GitHub
commit 0dd3f7e65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/python/grpcio/grpc/aio/_base_server.py

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

Loading…
Cancel
Save