-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_x_argument(as_dictionary=True)
fails if x values doesn't have =
#1369
Comments
… without `=`
… without `=`
… without `=`
Hi, Thanks for reporting
Yes, I think an empty string is the least surprising value here |
hmm not None? what do we do if someone asks for x value and there was no -x ? |
Well if |
oh ok. that's fine then |
This is how I think too, Talking about my use case, I just need something like multiple tags and I don't really care about the value. I don't even need the dict. I could use In any case, we still can check for the key with |
…or args without `=`
…rue)` for args without `=`
…onary=True)` for args without `=`
…s_dictionary=True)` for args without `=`
… without `=`
…or args without `=`
…rue)` for args without `=`
…onary=True)` for args without `=`
…s_dictionary=True)` for args without `=`
…ments(as_dictionary=True)` for args without `=`
Iuri de Silvio has proposed a fix for this issue in the main branch: Fix |
Describe the bug
It is not safe to use
get_x_argument(as_dictionary=True)
because it fails with-x foo
.Expected behavior
I'd expect an empty string
""
(orTrue
? orNone
?) as value instead of breaking my script.To Reproduce
Error
Versions.
Additional context
Have a nice day!
The text was updated successfully, but these errors were encountered: