mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Don't use "*args, **kw" in the docs when only one of the overloads is not ignored.
This commit is contained in:
5
TODO.rst
5
TODO.rst
@@ -177,11 +177,6 @@ Other Dev Stuff
|
||||
bytes objects, they should probably be string objects. Or not, sip's
|
||||
default might be best... See ModuleDef.addGlobalStr if I change my mind.
|
||||
|
||||
* If a function or method has overloads but all but one are ignored then the
|
||||
doc generator should not use the "\*args, \*\*kw" form of output and just use
|
||||
the args string of the remaining function or method definition like for
|
||||
those that do not have overloads. For example, see Window.GetClientSize
|
||||
|
||||
* Check gui_scripts entry points.
|
||||
|
||||
* wx.Window.DoEraseBackground?
|
||||
|
||||
@@ -337,7 +337,7 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase, FixWxPrefix):
|
||||
if not function.pyName:
|
||||
return
|
||||
stream.write('\ndef %s' % function.pyName)
|
||||
if function.overloads:
|
||||
if function.hasOverloads():
|
||||
stream.write('(*args, **kw)')
|
||||
else:
|
||||
argsString = function.pyArgsString
|
||||
@@ -503,7 +503,7 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase, FixWxPrefix):
|
||||
if method.isStatic:
|
||||
stream.write('\n%s@staticmethod' % indent)
|
||||
stream.write('\n%sdef %s' % (indent, name))
|
||||
if method.overloads:
|
||||
if method.hasOverloads():
|
||||
if not method.isStatic:
|
||||
stream.write('(self, *args, **kw)')
|
||||
else:
|
||||
|
||||
@@ -583,7 +583,7 @@ class ParameterList(Node):
|
||||
parent = self.GetTopLevelParent()
|
||||
is_overload = parent.is_overload if parent else False
|
||||
|
||||
if xml_item.overloads and not is_overload:
|
||||
if xml_item.hasOverloads() and not is_overload:
|
||||
return
|
||||
|
||||
arguments = xml_item.pyArgsString
|
||||
@@ -2454,7 +2454,7 @@ class XMLDocString(object):
|
||||
name = method.name or method.pyName
|
||||
name = removeWxPrefix(name)
|
||||
|
||||
if method.overloads and not self.is_overload:
|
||||
if method.hasOverloads() and not self.is_overload:
|
||||
if not method.isStatic:
|
||||
arguments = '(self, *args, **kw)'
|
||||
else:
|
||||
@@ -2489,7 +2489,7 @@ class XMLDocString(object):
|
||||
name = function.pyName if function.pyName else function.name
|
||||
name = removeWxPrefix(name)
|
||||
|
||||
if function.overloads and not self.is_overload:
|
||||
if function.hasOverloads() and not self.is_overload:
|
||||
arguments = '(*args, **kw)'
|
||||
else:
|
||||
if "->" in function.pyArgsString:
|
||||
@@ -2521,7 +2521,7 @@ class XMLDocString(object):
|
||||
self.parameter_list.CheckSignature()
|
||||
return
|
||||
|
||||
if not self.xml_item.overloads or self.is_overload:
|
||||
if not self.xml_item.hasOverloads() or self.is_overload:
|
||||
self.parameter_list = ParameterList('', None, self.xml_item, self.kind)
|
||||
self.root.Insert(self.parameter_list, before=Section)
|
||||
self.parameter_list.CheckSignature()
|
||||
@@ -2878,7 +2878,7 @@ class XMLDocString(object):
|
||||
|
||||
if self.overloads:
|
||||
|
||||
docstrings += '\n\n%s|overload| **Overloaded Implementations**:\n\n'%spacer
|
||||
docstrings += '\n\n%s|overload| Overloaded Implementations:\n\n'%spacer
|
||||
docstrings += '%s**~~~**\n\n'%spacer
|
||||
|
||||
for index, over in enumerate(self.overloads):
|
||||
|
||||
Reference in New Issue
Block a user