This repository was archived by the owner on Mar 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
gapic/templates/%namespace/%name_%version/%sub/services/%service Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 9090 {% if method .flattened_fields %}
9191 # - Quick check: If we got a request object, we should *not* have
9292 # gotten any keyword arguments that map to the request.
93- has_flattened_params = any([{{ method.flattened_fields.values()|join(", ", attribute="name") }}])
93+ flattened_params = [{{ method.flattened_fields.values()|join(", ", attribute="name") }}]
94+ has_flattened_params = len([param for param in flattened_params if param is not None]) > 0
9495 if request is not None and has_flattened_params:
9596 raise ValueError('If the `request` argument is set, then none of '
9697 'the individual field arguments should be set.')
Original file line number Diff line number Diff line change @@ -317,7 +317,8 @@ class {{ service.async_client_name }}:
317317 {% if method .flattened_fields %}
318318 # - Quick check: If we got a request object, we should *not* have
319319 # gotten any keyword arguments that map to the request.
320- has_flattened_params = any([{{ method.flattened_fields.values()|join(", ", attribute="name") }}])
320+ flattened_params = [{{ method.flattened_fields.values()|join(", ", attribute="name") }}]
321+ has_flattened_params = len([param for param in flattened_params if param is not None]) > 0
321322 if request is not None and has_flattened_params:
322323 raise ValueError("If the `request` argument is set, then none of "
323324 "the individual field arguments should be set.")
You can’t perform that action at this time.
0 commit comments