Message385447
The refactoring looks reasonable.
But while we are tweaking:
def _format_action_invocation(self, action):
I wonder if we also give users more control over how multiple option strings are formatted. Currently if
parser.add_argument('-f', '--foo', help='something')
the help line will be
-f FOO, --foo FOO something
with this alternate formatter it would be (I think)
-f FOO, --foo=FOO something
But with longer option strings users often want
-f, --foo FOO something
or even just
-f, --foo something
we can almost get the last with `metavar=''`
-f , --foo something
which has a superfluous space before the comma.
I don't recall if there's already a bug/issue for this or not. Maybe the fix is a subclass with a complete replacement of this _format_action_invocation method. I'll have do more research (here and on Stackoverflow). |
|
Date |
User |
Action |
Args |
2021-01-21 21:12:38 | paul.j3 | set | recipients:
+ paul.j3, rhettinger, will |
2021-01-21 21:12:38 | paul.j3 | set | messageid: <1611263558.05.0.266755772192.issue42980@roundup.psfhosted.org> |
2021-01-21 21:12:38 | paul.j3 | link | issue42980 messages |
2021-01-21 21:12:37 | paul.j3 | create | |
|