File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -242,8 +242,8 @@ def process_argument(action, value):
242242 command += ' {}' .format (item )
243243
244244 # If this is a flag parameter that can accept a variable number of arguments and we have not
245- # reached the max number, add a list completion suffix to tell argparse to move to the next
246- # parameter
245+ # reached the max number, add 2 prefix chars (ex: --) to tell argparse to stop processing the
246+ # parameter. This also means the remaining arguments will be treated as positionals by argparse.
247247 if action .option_strings and isinstance (action , _RangeAction ) and action .nargs_max is not None and \
248248 action .nargs_max > len (value ):
249249 command += ' {0}{0}' .format (self ._parser .prefix_chars [0 ])
@@ -257,8 +257,8 @@ def process_argument(action, value):
257257 command += ' {}' .format (value )
258258
259259 # If this is a flag parameter that can accept a variable number of arguments and we have not
260- # reached the max number, add a list completion suffix to tell argparse to move to the next
261- # parameter
260+ # reached the max number, add 2 prefix chars (ex: --) to tell argparse to stop processing the
261+ # parameter. This also means the remaining arguments will be treated as positionals by argparse.
262262 if action .option_strings and isinstance (action , _RangeAction ) and action .nargs_max is not None and \
263263 action .nargs_max > 1 :
264264 command += ' {0}{0}' .format (self ._parser .prefix_chars [0 ])
You can’t perform that action at this time.
0 commit comments