mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
Fix names of base classes in Python classes when the base is from the binary modules.
This commit is contained in:
@@ -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 -----------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user