- 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:
Andrea Gavana
2012-06-12 20:34:13 +00:00
parent 9233e2747b
commit 3e720e2530
4 changed files with 29 additions and 12 deletions

View File

@@ -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