diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-05 21:52:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 21:52:25 +0100 |
commit | d152ac291e0c24883f1b5047bd49900bc5f0d889 (patch) | |
tree | 68b162d3e9c8e6c1ef4914d767eed6e321920b42 | |
parent | a11d8954db07485e5a1fb6f965ed8ede3e4c0040 (diff) | |
parent | 4d9b7b9803422118077555ddf53a2550180209a0 (diff) |
Merge pull request #26654 from merumelu/doc-makerst-vararg
makerst: make vararg methods look the same as in editor help
-rwxr-xr-x | doc/tools/makerst.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 22c0b5d1fd..4b5785f604 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -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: |