prompt-toolkit / prompt-toolkit/python-prompt-toolkit
[DOCUMENTATION] validate_while_typing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Hi there!
I'm using this library and it's great; I ran into a problem and ended digging the code. The problem was that I was expecting validation after pressing "enter" but it was validating ¿each keystroke? Setting validate_while_typing = False fixed the problem.
Nonetheless, the documentation says that the validation is run after pressing enter (which means that "validate_while_typing" is default=False), but looking at the code, I believe that the default is the opposite (`shortcuts/prompt.py')
validate_while_typing=True # in version 2.0.9 (the one I'm using)
validate_while_typing: FilterOrBool = True, # in current master version
Thanks for sharing this library, it's really amazing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read shortcuts/prompt.py to confirm the current default for validate_while_typing, then locate the documentation that describes validation timing. Update the documentation so it matches the confirmed default behavior and verify that the description distinguishes validation on each keystroke from validation after pressing Enter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100