Correct the return types

pull/21232/head
Lidi Zheng 5 years ago
parent e9e77e5123
commit 467bd83845
  1. 13
      src/python/grpcio/grpc/experimental/aio/_channel.py

@ -18,6 +18,7 @@ from typing import Any, Optional, Sequence, Text, Tuple
import grpc import grpc
from grpc import _common from grpc import _common
from grpc._cython import cygrpc from grpc._cython import cygrpc
from . import _base_call
from ._call import Call, UnaryUnaryCall, UnaryStreamCall from ._call import Call, UnaryUnaryCall, UnaryStreamCall
from ._typing import (DeserializingFunction, MetadataType, SerializingFunction) from ._typing import (DeserializingFunction, MetadataType, SerializingFunction)
@ -48,7 +49,8 @@ class UnaryUnaryMultiCallable:
metadata: Optional[MetadataType] = None, metadata: Optional[MetadataType] = None,
credentials: Optional[grpc.CallCredentials] = None, credentials: Optional[grpc.CallCredentials] = None,
wait_for_ready: Optional[bool] = None, wait_for_ready: Optional[bool] = None,
compression: Optional[grpc.Compression] = None) -> Call: compression: Optional[grpc.Compression] = None
) -> _base_call.UnaryUnaryCall:
"""Asynchronously invokes the underlying RPC. """Asynchronously invokes the underlying RPC.
Args: Args:
@ -117,7 +119,8 @@ class UnaryStreamMultiCallable:
metadata: Optional[MetadataType] = None, metadata: Optional[MetadataType] = None,
credentials: Optional[grpc.CallCredentials] = None, credentials: Optional[grpc.CallCredentials] = None,
wait_for_ready: Optional[bool] = None, wait_for_ready: Optional[bool] = None,
compression: Optional[grpc.Compression] = None) -> Call: compression: Optional[grpc.Compression] = None
) -> _base_call.UnaryStreamCall:
"""Asynchronously invokes the underlying RPC. """Asynchronously invokes the underlying RPC.
Args: Args:
@ -202,7 +205,8 @@ class Channel:
self, self,
method: Text, method: Text,
request_serializer: Optional[SerializingFunction] = None, request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None): response_deserializer: Optional[DeserializingFunction] = None
) -> UnaryUnaryMultiCallable:
"""Creates a UnaryUnaryMultiCallable for a unary-unary method. """Creates a UnaryUnaryMultiCallable for a unary-unary method.
Args: Args:
@ -224,7 +228,8 @@ class Channel:
self, self,
method: Text, method: Text,
request_serializer: Optional[SerializingFunction] = None, request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None): response_deserializer: Optional[DeserializingFunction] = None
) -> UnaryStreamMultiCallable:
return UnaryStreamMultiCallable(self._channel, _common.encode(method), return UnaryStreamMultiCallable(self._channel, _common.encode(method),
request_serializer, request_serializer,
response_deserializer) response_deserializer)

Loading…
Cancel
Save