EveryVoice
a80e7e79 - fix: make wizard prompt code clearer and fix crash

Commit
90 days ago
fix: make wizard prompt code clearer and fix crash - docstring for get_response_from_menu_prompt() now documents all the parameters, and all the possible return types based on the parameters. - fix: get_response_from_menu_prompt() no longer ever returns None: when there are no selections with multi=True, you can an empty tuple, so you can always iterate over the return value of this function if you said multi=True. This fixes a bug in the wizard where you'd get an exception if you selected no text processing steps. - Refactor get_response_from_menu_prompt() to make its logic clearer. - Remove redundant multi=False, search=False and return_indices=False in all the places where we call get_response_from_menu_prompt(), since they don't really make the code any clearer. We only need to specify them when we deviate from the defaults. - Augment unit testing to exercise None as simple_term_menu return value.
Author
Committer
Parents
Loading