From c9bbcdafcf8d254f44978a66af5078656021fd47 Mon Sep 17 00:00:00 2001 From: Weiduhuo <1281586535@qq.com> Date: Sun, 12 Nov 2023 13:57:16 +0800 Subject: [PATCH] fix bug about disabled Choice with shortcut_keys attribute --- questionary/prompts/select.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/questionary/prompts/select.py b/questionary/prompts/select.py index d6d41c5d..042d9f7d 100644 --- a/questionary/prompts/select.py +++ b/questionary/prompts/select.py @@ -200,7 +200,7 @@ def _(event): "for movement are disabled. " "This choice is not reachable.".format(c.title) ) - if isinstance(c, Separator) or c.shortcut_key is None: + if isinstance(c, Separator) or c.shortcut_key is None or c.disabled: continue # noinspection PyShadowingNames