Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Documentation for resolve parameter on prompt_choices #163

Open
hugo-cisneiros-movile opened this issue May 25, 2016 · 1 comment
Open

Comments

@hugo-cisneiros-movile
Copy link

Hi, I tried to use prompt_choices and it wasn't working with case sensitive options. For example:

Which cluster? - (Cluster1): Cluster1
Which cluster? - (Cluster1): cluster1
Which cluster? - (Cluster1): 
...

Looking at the cli.py code, there is a resolve parameter that defaults to ascii_lowercase. Later in the method, the option is passed by this resolve function and every options turns to lowercase before comparing.

I fixed this calling prompt_choices with resolve=str instead of ascii_lowercase.

It would be good if this parameter was listed/described in the API documentation :)

Thanks!

@jeffwidman
Copy link
Collaborator

PR welcome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants