Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around changes to argparse private API #673

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions colcon_core/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,13 @@ def _parse_optional(self, arg_string):
# the option. As of that PR (which is in Python 3.13, and
# backported to Python 3.12), it returns a 4-tuple. Check for
# either here.
# A similar regression later occurred when _parse_optional()
# started returning a list of tuples, brought in by
# https://github.com/python/cpython/pull/124631 .
if result in (
(None, arg_string, None),
(None, arg_string, None, None),
[(None, arg_string, None, None)],
):
# in the case there the arg is classified as an unknown 'O'
# override that and classify it as an 'A'
Expand Down
Loading