Skip to content

Commit

Permalink
fix: also add the async client to __all__ (#869)
Browse files Browse the repository at this point in the history
Follow up to #859

Closes #815

Also delete a stray } in feature_fragments which was resulting in almost empty files getting generated in clients. https://github.com/googleapis/googleapis-gen/blob/master/google/appengine/v1/google-cloud-appengine-v1-py/examples/feature_fragments
  • Loading branch information
busunkim96 authored May 7, 2021
1 parent 396e597 commit 09c90fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gapic/templates/%namespace/%name_%version/%sub/__init__.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ __all__ = (
{% for service in api.services.values()
if service.meta.address.subpackage == api.subpackage_view -%}
'{{ service.client_name }}',
{% if 'grpc' in opts.transport %}
'{{ service.async_client_name }}',
{% endif %}
{% endfor -%}
{% for proto in api.protos.values()
if proto.meta.address.subpackage == api.subpackage_view -%}
Expand Down
2 changes: 1 addition & 1 deletion gapic/templates/examples/feature_fragments.j2
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ with open({{ attr.input_parameter }}, "rb") as f:
{% macro render_client_setup(module_name, client_name) %}
# Create a client
client = {{ module_name }}.{{ client_name }}()
{% endmacro %}}
{% endmacro %}

{% macro render_request_setup(full_request, module_name, request_type) %}
# Initialize request argument(s)
Expand Down

0 comments on commit 09c90fa

Please sign in to comment.