Message288683
Sorry, I missed that. For some reason I looking something bigger.
That's coming from the `metavar=""'.
If I specify `metavar="xxx" that help line will have
-p xxx, --projectid xxx
Replace the 'xxx` with '', and you still have space between '-p' and ','.
Now that I see it, it looks familiar. I noted it in passing in StackOverflow answer, http://stackoverflow.com/a/40497623/901925
I can't find a related bug/issue.
It's a natural consequence of the formatting in HelpFormatter._format_action_invocation
# if the Optional takes a value, format is:
# -s ARGS, --long ARGS
parts.append('%s %s' % (option_string, args_string))
There's no special handling for the case where ARGS is blank.
That formatter method could be customized as suggested in
http://stackoverflow.com/a/23941599/901925
Often people want a more compact invocation like:
-s, --long ARG help
Usage gets that space between option_string and args_string, but it gets striped out later.
So the fix (not tested) would something like:
def _format_action_invocation(self, action):
....
for option_string in action.option_strings:
if len(args_string)>0:
parts.append('%s %s' % (option_string, args_string))
else:
parts.append('%s' % option_string)
.... |
|
Date |
User |
Action |
Args |
2017-02-27 23:48:31 | paul.j3 | set | recipients:
+ paul.j3, falu2010 |
2017-02-27 23:48:31 | paul.j3 | set | messageid: <1488239311.17.0.201013695315.issue29626@psf.upfronthosting.co.za> |
2017-02-27 23:48:31 | paul.j3 | link | issue29626 messages |
2017-02-27 23:48:30 | paul.j3 | create | |
|