File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -546,10 +546,13 @@ def select_choices(
546546 func_desc : Optional [FuncDesc ] = None ,
547547 sort : Optional [bool ] = True ,
548548) -> Any :
549- """Ask the user to select one or multiple from a list of choices. Note: delimit your choices by space, comma or semi colon.
549+ """
550+ Ask the user to select one or multiple from a list of choices,
551+ delimited by space, comma or semi colon.
550552
551553 Will loop until:
552- * the user enters a valid index
554+
555+ * the user enters a valid selection
553556 * or leaves the prompt empty
554557
555558 In the last case, `None` will be returned
Original file line number Diff line number Diff line change @@ -316,21 +316,21 @@ Asking for user input
316316 .. versionchanged :: 0.7
317317
318318 The :py:exc: `KeyboardInterrupt ` exception is no longer caught by this function.
319-
319+
320320.. autofunction :: select_choices
321321
322322
323323 ::
324324
325325 >>> choices = ["apple", "banana", "orange"]
326- >>> fruit = cli_ui.ask_choice("Select several fruits", choices=choices)
326+ >>> fruits = cli_ui.ask_choice("Select several fruits", choices=choices)
327327 :: Select a fruit
328328 1 apple
329329 2 banana
330330 3 orange
331- <1,2>
332- >>> fruit
333- ( 'apple, 'banana')
331+ <1, 2>
332+ >>> fruits
333+ [ 'apple' , 'banana']
334334
335335
336336.. autofunction :: ask_yes_no
You can’t perform that action at this time.
0 commit comments