Fix names of base classes in Python classes when the base is from the binary modules.

This commit is contained in:
Robin Dunn
2016-06-09 16:02:45 -07:00
parent fbe9163da8
commit ddfbc17469
2 changed files with 12 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ from datetime import datetime
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('.'))
sys.path.append('..') sys.path.append(os.path.abspath('..'))
# -- General configuration ----------------------------------------------------- # -- General configuration -----------------------------------------------------

View File

@@ -632,12 +632,22 @@ class Class(ParentBase):
for item in sups: for item in sups:
item = repr(item) item = repr(item)
sup = item.replace('<class ', '').replace('>', '').replace('<type ', '') sup = item.replace('<class ', '').replace('>', '').replace('<type ', '')
sup = sup.strip().replace('"', '').replace("'", '') sup = sup.strip().replace('"', '').replace("'", '')
if ' at ' in sup: if ' at ' in sup:
sup = sup[0:sup.index(' at ')].strip() sup = sup[0:sup.index(' at ')].strip()
if sup.startswith('wx._'):
# take out the '_core' in things like 'wx._core.Control'
parts = sup.split('.')
if parts[1] == '_core':
del parts[1]
else:
# or just the '_' otherwise
parts[1] = parts[1][1:]
sup = '.'.join(parts)
sortedSupClasses.append(sup) sortedSupClasses.append(sup)
sortedSupClasses.sort() sortedSupClasses.sort()