File tree Expand file tree Collapse file tree
sdks/python/apache_beam/runners/portability Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,12 +144,15 @@ def add_runner_options(parser):
144144 try :
145145 # no default values - we don't want runner options
146146 # added unless they were specified by the user
147- add_arg_args = {'action' : 'store' , 'help' : option .description }
147+ add_arg_args = {'action' : 'store' }
148+ if option .description is not None :
149+ # Prevent bare %'s in help strings in 3.14+
150+ add_arg_args ['help' ] = option .description .replace ("%" , "%%" )
148151 if option .type == beam_job_api_pb2 .PipelineOptionType .BOOLEAN :
149152 add_arg_args ['action' ] = 'store_true' \
150153 if option .default_value != 'true' else 'store_false'
151154 elif option .type == beam_job_api_pb2 .PipelineOptionType .INTEGER :
152- add_arg_args ['type' ] = int
155+ add_arg_args ['type' ] = int # type: ignore
153156 elif option .type == beam_job_api_pb2 .PipelineOptionType .ARRAY :
154157 add_arg_args ['action' ] = 'append'
155158 parser .add_argument ("--%s" % option .name , ** add_arg_args )
You can’t perform that action at this time.
0 commit comments