Skip to content

Commit f07808a

Browse files
committed
Changed some logic and added comment why
1 parent ef999cf commit f07808a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd2/argparse_completer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,9 @@ def update_mutex_groups(arg_action: argparse.Action) -> bool:
331331

332332
# Check if we have a positional to consume this token
333333
if pos_arg_state is not None:
334-
if not update_mutex_groups(pos_arg_state.action):
335-
return []
334+
# No need to check for an error since we remove a completed group's positional from
335+
# remaining_positionals which means this action can't belong to a completed mutex group
336+
update_mutex_groups(pos_arg_state.action)
336337

337338
consume_argument(pos_arg_state)
338339

0 commit comments

Comments
 (0)