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