You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You named both the options "ops". The parser sees -f and adds the raw value under "ops". The parser doesn't see -n, so it doesn't set the raw value to flag_value. The opts are converted in order. The first option sees the raw value and stores the expected processed value. The second option, which is a String type, sees the same raw value and overwrites the stored processed value.
I'm not entirely clear what you're trying to do with that code, but there's probably a more appropriate construct or processing you can do. Perhaps a different command for new, or something from #257 for a mutually exclusive option. Or most straightforward, give them different names then do extra processing in the command.
So you mean everything should be the same type= and I should change what I return based on param? I wanna be able to do ./foo -f 1 -n -f 2 -n -f 3 and so on, like the beep command.
I thought each @option had its own type, not each... thingy in def foo([here]): with its own type. This is not clearly documented and the issue should be kept open until it's either clearly documented or changed.
With this program:
calling it as
./foo -f 1
should print something along the lines of:but instead prints something along the lines of:
The text was updated successfully, but these errors were encountered: