Skip to content

Commit

Permalink
fix: fix types on server and bidi streaming callables (#641)
Browse files Browse the repository at this point in the history
The return type is an Awaitable that produces an AsyncIterator.
  • Loading branch information
dpcollins-google authored Oct 8, 2020
1 parent 517118c commit d92c202
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, {% if service.any_server_streaming %}AsyncIterable, {% endif %}{% if service.any_client_streaming %}AsyncIterator, {% endif %}Sequence, Tuple, Type, Union
from typing import Dict, {% if service.any_server_streaming %}AsyncIterable, Awaitable, {% endif %}{% if service.any_client_streaming %}AsyncIterator, {% endif %}Sequence, Tuple, Type, Union
import pkg_resources

import google.api_core.client_options as ClientOptions # type: ignore
Expand Down Expand Up @@ -117,7 +117,7 @@ class {{ service.async_client_name }}:
{%- if not method.server_streaming %}
) -> {{ method.client_output_async.ident }}:
{%- else %}
) -> AsyncIterable[{{ method.client_output_async.ident }}]:
) -> Awaitable[AsyncIterable[{{ method.client_output_async.ident }}]]:
{%- endif %}
r"""{{ method.meta.doc|rst(width=72, indent=8) }}

Expand Down

0 comments on commit d92c202

Please sign in to comment.