From 7d4375fc6adf7a155e48605e2863901a031ff8dc Mon Sep 17 00:00:00 2001 From: Shunping Huang Date: Wed, 26 Feb 2025 11:15:12 -0500 Subject: [PATCH] Fix the case when update_compatibility_version is used without argument. --- sdks/python/apache_beam/options/pipeline_options.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdks/python/apache_beam/options/pipeline_options.py b/sdks/python/apache_beam/options/pipeline_options.py index 8eba11d9ea34..775f73bd2afd 100644 --- a/sdks/python/apache_beam/options/pipeline_options.py +++ b/sdks/python/apache_beam/options/pipeline_options.py @@ -591,6 +591,8 @@ def _add_argparse_args(cls, parser): parser.add_argument( '--update_compatibility_version', default=None, + nargs='?', + const=None, help='Attempt to produce a pipeline compatible with the given prior ' 'version of the Beam SDK. ' 'See for example, https://cloud.google.com/dataflow/docs/guides/'