Add feature to forbid option be passed multiple times
See original GitHub issueFor example:
@click.option("--string", type=click.STRING)
def echo(string):
click.echo(string)
when running
echo --string=str1 --string=str2
it will print the second one. I would like to forbid passing it more than once.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Manage your passes in Wallet on iPhone - Apple Support
Tap the pass, tap the More button , then tap Pass Details. Choose any of the following (not all options are available on...
Read more >More on data validation - Microsoft Support
To prevent users from copying and filling data by dragging and dropping cells, go to File > Options > Advanced > Editing options...
Read more >6 Google Forms settings you should know about - Zapier
Multiple -choice questions can be graded in real time—just point out the correct answer, and Google Forms will take care of the grading...
Read more >curl.1 the man page
Providing -a, --append multiple times has no extra effect. Disable it again with --no-append. Example: curl --upload-file local --append ftp://example.com/.
Read more >Strict Mode - React
Additional functionality will be added with future releases of React. ... this component multiple times could lead to invalid application state.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m sticking with the current behavior. It allows overriding options defined earlier, which is useful when using
alias
in the shell or building up a list of args in Python. The behavior seems consistent with Python itself, where later assignment overrides earlier ones.I found a work-around that is to turn on the
multiple
flag and check the option’s length, for example:Run it: