From 386977ff419e8f309dcf0f87225c411e5c2a08d0 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 1 Apr 2020 15:16:55 -0700 Subject: [PATCH] Annotate metadata variable as Tuple instead of Sequence --- src/python/grpcio/grpc/experimental/aio/_call.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/python/grpcio/grpc/experimental/aio/_call.py b/src/python/grpcio/grpc/experimental/aio/_call.py index c038b3a3ffa..25e8f7eeaa8 100644 --- a/src/python/grpcio/grpc/experimental/aio/_call.py +++ b/src/python/grpcio/grpc/experimental/aio/_call.py @@ -14,10 +14,10 @@ """Invocation-side implementation of gRPC Asyncio Python.""" import asyncio -from functools import partial -import logging import enum -from typing import AsyncIterable, Awaitable, Optional +import logging +from functools import partial +from typing import AsyncIterable, Awaitable, Optional, Tuple import grpc from grpc import _common @@ -25,7 +25,8 @@ from grpc._cython import cygrpc from . import _base_call from ._typing import (DeserializingFunction, DoneCallbackType, MetadataType, - RequestType, ResponseType, SerializingFunction) + MetadatumType, RequestType, ResponseType, + SerializingFunction) __all__ = 'AioRpcError', 'Call', 'UnaryUnaryCall', 'UnaryStreamCall' @@ -161,7 +162,7 @@ class Call: _loop: asyncio.AbstractEventLoop _code: grpc.StatusCode _cython_call: cygrpc._AioCall - _metadata: MetadataType + _metadata: Tuple[MetadatumType] _request_serializer: SerializingFunction _response_deserializer: DeserializingFunction