mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-25 22:18:24 +00:00
Allow uppercase "Y" and "N" as answers to boolean questions
This commit is contained in:
parent
695cc0d18a
commit
becd03cbf8
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## Latest
|
||||
|
||||
- [Improvement] Allow uppercase "Y" and "N" as answers to boolean questions
|
||||
|
||||
## v3.3.4 (2019-04-09)
|
||||
|
||||
- [Improvement] Rename `--silent` option to `-y/--yes`
|
||||
|
@ -186,9 +186,9 @@ def ask_bool(question, key, config):
|
||||
suffix = " [Yn]" if config[key] else " [yN]"
|
||||
answer = click.prompt(
|
||||
fmt.question(question) + suffix,
|
||||
type=click.Choice(["y", "n"]),
|
||||
type=click.Choice(["y", "Y", "n", "N"]),
|
||||
prompt_suffix=" ", default=default, show_default=False, show_choices=False,
|
||||
)
|
||||
).lower()
|
||||
config[key] = answer == "y"
|
||||
|
||||
def ask_choice(question, key, config, choices):
|
||||
|
Loading…
x
Reference in New Issue
Block a user