Skip to content

Commit d34acca

Browse files
committed
add support for optional arguments
1 parent 2a8c9fd commit d34acca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.generator/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ def handle_generate(
289289
generator_options.append(
290290
f"{config_key_map[key]}={config_value},"
291291
)
292+
optional_arguments = result[py_gapic_entry].get("opt_args", None)
293+
if optional_arguments:
294+
[generator_options.append(f"{opt_arg},") for opt_arg in optional_arguments]
292295
with tempfile.TemporaryDirectory() as tmp_dir:
293296
generator_command = (
294297
f"protoc {api_path}/*.proto --python_gapic_out={tmp_dir}"

0 commit comments

Comments
 (0)