Merge pull request #26654 from merumelu/doc-makerst-vararg

makerst: make vararg methods look the same as in editor help
This commit is contained in:
Rémi Verschelde 2019-03-05 21:52:25 +01:00 committed by GitHub
commit d152ac291e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -950,6 +950,12 @@ def make_method_signature(class_def, method_def, make_ref, state): # type: (Cla
if arg.default_value is not None:
out += '=' + arg.default_value
if isinstance(method_def, MethodDef) and method_def.qualifiers is not None and 'vararg' in method_def.qualifiers:
if len(method_def.parameters) > 0:
out += ', ...'
else:
out += '...'
out += ' **)**'
if isinstance(method_def, MethodDef) and method_def.qualifiers is not None: