mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Phoenix:
- Correctly handle and reference inherited methods inside class/method descriptions; - Reformat the method's short descriptions in the Summary tables to properly show hyperlinks to the methods themselves. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -261,6 +261,7 @@ def FindInherited(input, class_summary, enum_base, text):
|
||||
continue
|
||||
|
||||
methods, bases, short_description = class_summary[curr_class]
|
||||
methods = [m.split('.')[-1] for m in methods]
|
||||
|
||||
if meth_name in methods:
|
||||
continue
|
||||
@@ -268,20 +269,22 @@ def FindInherited(input, class_summary, enum_base, text):
|
||||
newstr = ''
|
||||
|
||||
for cls in bases:
|
||||
|
||||
if cls not in class_summary:
|
||||
continue
|
||||
|
||||
submethods, subbases, subshort = class_summary[cls]
|
||||
|
||||
if meth_name in submethods:
|
||||
short_submethods = [m.split('.')[-1] for m in submethods]
|
||||
|
||||
if meth_name in short_submethods:
|
||||
if not hasdot:
|
||||
newstr = ':meth:`~%s.%s`'%(cls, meth_name)
|
||||
elif not hastilde:
|
||||
newstr = ':meth:`%s.%s`'%(cls, meth_name)
|
||||
newstr = ':meth:`%s.%s <%s.%s>`'%(curr_class, meth_name, cls, meth_name)
|
||||
elif hasdot:
|
||||
newstr = ':meth:`~%s.%s`'%(cls, meth_name)
|
||||
else:
|
||||
newstr = ':meth:`%s.%s`'%(cls, meth_name)
|
||||
newstr = ':meth:`%s.%s <%s.%s>`'%(curr_class, meth_name, cls, meth_name)
|
||||
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user