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

@@ -632,12 +632,22 @@ class Class(ParentBase):
for item in sups:
item = repr(item)
sup = item.replace('<class ', '').replace('>', '').replace('<type ', '')
sup = sup.strip().replace('"', '').replace("'", '')
if ' at ' in sup:
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.sort()