Skip to content

Commit

Permalink
fix: stabilize the order of resource helper methods and (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
software-dov authored Aug 28, 2020
1 parent a810641 commit 7d2adde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ def test_{{ service.name|snake_case }}_grpc_lro_client():

{% endif -%}

{% for message in service.resource_messages -%}
{% for message in service.resource_messages|sort(attribute="resource_type") -%}
{% with molluscs = cycler("squid", "clam", "whelk", "octopus", "oyster", "nudibranch", "cuttlefish", "mussel", "winkle", "nautilus", "scallop", "abalone") -%}
def test_{{ message.resource_type|snake_case }}_path():
{% for arg in message.resource_path_args -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class {{ service.async_client_name }}:
DEFAULT_ENDPOINT = {{ service.client_name }}.DEFAULT_ENDPOINT
DEFAULT_MTLS_ENDPOINT = {{ service.client_name }}.DEFAULT_MTLS_ENDPOINT

{% for message in service.resource_messages -%}
{% for message in service.resource_messages|sort(attribute="resource_type") -%}
{{ message.resource_type|snake_case }}_path = staticmethod({{ service.client_name }}.{{ message.resource_type|snake_case }}_path)

parse_{{ message.resource_type|snake_case}}_path = staticmethod({{ service.client_name }}.parse_{{ message.resource_type|snake_case }}_path)
{% endfor %}

from_service_account_file = {{ service.client_name }}.from_service_account_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ def test_{{ service.name|snake_case }}_grpc_lro_async_client():

{% endif -%}

{% for message in service.resource_messages -%}
{% for message in service.resource_messages|sort(attribute="resource_type") -%}
{% with molluscs = cycler("squid", "clam", "whelk", "octopus", "oyster", "nudibranch", "cuttlefish", "mussel", "winkle", "nautilus", "scallop", "abalone") -%}
def test_{{ message.resource_type|snake_case }}_path():
{% for arg in message.resource_path_args -%}
Expand Down

0 comments on commit 7d2adde

Please sign in to comment.