From 8a65d4f449124796c1a155c37e71409bbc2cb4ac Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Mon, 4 Nov 2024 16:02:06 -0500 Subject: [PATCH] fix(ArgparseCompleter): adjust parsing for upstream private changes The upstream private API for `_parse_optional` changed, needed to update this. --- xonsh/cli_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xonsh/cli_utils.py b/xonsh/cli_utils.py index 2128f88e6..c881fdd63 100644 --- a/xonsh/cli_utils.py +++ b/xonsh/cli_utils.py @@ -543,6 +543,9 @@ class ArgparseCompleter: if not act_res: # it is not a option string: pass break + if isinstance(act_res, list): + assert len(act_res) == 1 + act_res = act_res[0] # it is a valid option and advance self.remaining_args = self.remaining_args[1:] act, *_, value = act_res