Skip to content

Commit b025102

Browse files
authored
When more than one instance of the same PipelineOption subclass is detected, use the first one. (#36704)
1 parent 107a558 commit b025102

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdks/python/apache_beam/options/pipeline_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def get_all_options(
508508
subset = {}
509509
parser = _BeamArgumentParser(allow_abbrev=False)
510510
for cls in PipelineOptions.__subclasses__():
511-
subset[str(cls)] = cls
511+
subset.setdefault(str(cls), cls)
512512
for cls in subset.values():
513513
cls._add_argparse_args(parser) # pylint: disable=protected-access
514514
if add_extra_args_fn:

0 commit comments

Comments
 (0)