Skip to content

Commit

Permalink
Added comments to changes supporting different versions of argparse i…
Browse files Browse the repository at this point in the history
…n platform/config.py.
  • Loading branch information
davidraker committed Apr 20, 2024
1 parent dca3a8d commit 87d8f4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions volttron/platform/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ def _take(n):
cli_args.append(arg_string)
continue
# Some kind of option was encountered, so deal with it
if len(option_tuple) == 3:
if len(option_tuple) == 3: # Argparse behavior on Python versions < 3.11.9 and < 3.12.3
action, option_string, explicit_arg = option_tuple
elif len(option_tuple) == 4:
elif len(option_tuple) == 4: # Argparse behavior on Python versions >= 3.11.9 and >= 3.12.3
action, option_string, _, explicit_arg = option_tuple
else:
raise ValueError(f'Unable to parse options: "{arg_strings}".')
Expand Down

0 comments on commit 87d8f4a

Please sign in to comment.