Skip to content

Commit

Permalink
[fix] Address bad import against nested messages. (#83)
Browse files Browse the repository at this point in the history
This commit fixes a spurious import that tried to import nested messages
directly from module scope.
  • Loading branch information
lukesneeringer authored Dec 30, 2018
1 parent 9277e9c commit a0c41b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ from . import {{ subpackage }}
-#}
{% for proto in api.protos.values()|sort(attribute='module_name')
if proto.meta.address.subpackage == api.subpackage_view -%}
{% for message in proto.messages.values()|sort(attribute='name') -%}
{% for message in proto.top.messages.values()|sort(attribute='name') -%}
from .{{ proto.module_name }} import {{ message.name }}
{% endfor %}{% endfor %}

Expand All @@ -24,7 +24,7 @@ __all__ = (
{%- endfor %}
{%- for proto in api.protos.values()|sort(attribute='module_name')
if proto.meta.address.subpackage == api.subpackage_view %}
{%- for message in proto.messages.values()|sort(attribute='name') %}
{%- for message in proto.top.messages.values()|sort(attribute='name') %}
'{{ message.name }}',
{%- endfor %}{% endfor %}
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name='gapic-generator',
version='0.3.0',
version='0.3.1',
license='Apache 2.0',
author='Luke Sneeringer',
author_email='lukesneeringer@google.com',
Expand Down

0 comments on commit a0c41b9

Please sign in to comment.