You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unsure if the documentation should be updated to reflect the codebase OR the codebase should be updated to reflect the documentation. The fix is simple.
Example
#Run the following example code on the current `master` branchimportquestionaryquestionary.prompt([{"type":"text","message":"Just enter any string value", "name":"string_value","default":"some_default_value"}])
#Before answering the question, hit Ctrl-C to generate a keyboard input. You should notice the {}, a dict, is returned.
Steps to reproduce
See the example code above
Expected behaviour
According to the documentation, this should return None, but the code actually returns {}, a dict. I am unsure which is correct, so either the code or documentation should be updated to reflect the intended behavior.
Latest version
I have checked that this issue occurs on the latest version of questionary.
Describe the bug
The following documentation states that if a keyboard interrupt is captured during a questionary.prompt() call, then
None
should be returned: https://github.com/tmbo/questionary/blob/cf10f3e650d1550376a8e908baa0c9811ef72041/docs/pages/advanced.rst#safeHowever, the codebase shows that if a Keyboard Interrupt is captured, then it is actually an empty dict
{}
which should be returned:questionary/questionary/prompt.py
Line 81 in cf10f3e
I am unsure if the documentation should be updated to reflect the codebase OR the codebase should be updated to reflect the documentation. The fix is simple.
Example
Steps to reproduce
See the example code above
Expected behaviour
According to the documentation, this should return None, but the code actually returns {}, a dict. I am unsure which is correct, so either the code or documentation should be updated to reflect the intended behavior.
Latest version
Questionary version
2.0.1 (and latest commit in repo master: cf10f3e)
Prompt Toolkit version
3.0.36
Operating System
macOS
The text was updated successfully, but these errors were encountered: