Replies: 1 comment
-
This is very easy to create by subclassing class LowercaseTransformingPrompt(Prompt):
@classmethod
def get_input(
cls,
console: Console,
prompt: TextType,
password: bool,
stream: Optional[TextIO] = None,
) -> str:
return (
super()
.get_input(console=console, prompt=prompt, password=password, stream=stream)
.lower()
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way to make the prompt case insensitive while providing choices?
I have some code like this:
It shouldn't really matter how they type it in since as far as the rest of the code is concerned it might as well be a boolean
so it would be nice to not have to prompt care about the capitalization.
Beta Was this translation helpful? Give feedback.
All reactions