Change Aio abort() function return type to NoReturn (#31984)

pull/31947/head^2
Xuan Wang 2 years ago committed by GitHub
parent dafbe7031b
commit e1f07786a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/python/grpcio/grpc/aio/_base_server.py

@ -14,7 +14,7 @@
"""Abstract base classes for server-side classes."""
import abc
from typing import Generic, Iterable, Mapping, Optional, Sequence
from typing import Generic, Iterable, Mapping, NoReturn, Optional, Sequence
import grpc
@ -178,7 +178,7 @@ class ServicerContext(Generic[RequestType, ResponseType], abc.ABC):
self,
code: grpc.StatusCode,
details: str = '',
trailing_metadata: MetadataType = tuple()) -> None:
trailing_metadata: MetadataType = tuple()) -> NoReturn:
"""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