Switch template to use betterhelp easy main.
This commit is contained in:
parent
755ff8a677
commit
f7065c9801
1 changed files with 6 additions and 3 deletions
|
@ -25,10 +25,13 @@ ____my__command____:
|
||||||
|
|
||||||
DOCSTRING = betterhelp.add_previews(DOCSTRING, SUB_DOCSTRINGS)
|
DOCSTRING = betterhelp.add_previews(DOCSTRING, SUB_DOCSTRINGS)
|
||||||
|
|
||||||
@betterhelp.subparser_betterhelp(parser, main_docstring=DOCSTRING, sub_docstrings=SUB_DOCSTRINGS)
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
args = parser.parse_args(argv)
|
return betterhelp.subparser_main(
|
||||||
return args.func(args)
|
argv,
|
||||||
|
parser,
|
||||||
|
main_docstring=DOCSTRING,
|
||||||
|
sub_docstrings=SUB_DOCSTRINGS,
|
||||||
|
)
|
||||||
|
|
||||||
]]></content>
|
]]></content>
|
||||||
<tabTrigger>helptext</tabTrigger>
|
<tabTrigger>helptext</tabTrigger>
|
||||||
|
|
Loading…
Reference in a new issue