generate_doc: Add varargs to syntax.

This commit is contained in:
Florian Bruhin 2014-08-02 23:03:35 +02:00
parent f4edb5e9d1
commit 61c23f4684

View File

@ -130,6 +130,8 @@ def _get_cmd_syntax(name, cmd):
elif maxargs is None or i <= maxargs:
words.append('[<{}>]'.format(arg))
i += 1
if argspec.varargs is not None:
words.append('[<{name}> [...]]'.format(name=argspec.varargs))
return (' '.join(words), defaults)