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
Non shitty parser errors / no per-task argspec help #57
Conversation
bitprophet
commented
Mar 18, 2013
- When you don't give enough positional args it doesn't say which ones weren't given
- When you give an unknown flag it doesn't say what is available
- AKA there's no per-task help, this is a must-have
This requires the dreaded "optional argument value" parser implementation: when a flag can optionally take a value, what does one do with the next token if there is any ambiguity (versus unfilled posargs or values that look like valid task names or other flags). I think the best way for now is to refuse the temptation to guess, as per PEP20, and raise an error whenever ambiguity strikes. Will take a stab at this and see how hard that is to do. |
Picking this back up...
|
Actually I think the "explicit API call" is cleanest, let's do that. |
Womp, those 2 failing tests now pass \o/ Time to fill in the other 3 skipped ones, then make sure there's a good high level test (or that it's used to fill in per-task help shit). |
Conflicts: invoke/parser/argument.py tests/parser/argument.py
Skipped tests: filled. Hopefully in bidness. Wrote failing test for e.g. |
Split off #76 for detailed help shit, going with a basic-ish view (aping core help, of course) for now. |
Per-task help output works in basic form now! What's missing still:
|
Done, and done. And...done! unless I broke python 3 somewhere, will find out soon. |
I did break it! (Initially in master. Heh.) Fixed now locally, waiting for Travis to confirm. |
GREEN |
Non shitty parser errors / no per-task argspec help