This commit is contained in:
Kovid Goyal 2022-01-01 11:21:30 +05:30
parent a78d3cd611
commit b1c0ca7b6e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# autogenerated by __main__.py do not edit
top_level_module_names=('QtCore', 'QtGui', 'QtWidgets', 'QtNetwork', 'QtSvg', 'QtPrintSupport', 'QtWebEngineCore', 'QtWebEngineWidgets')
def __getattr__(name):
if name in top_level_module_names:
import importlib
return importlib.import_module("PyQt6." + name)
raise AttributeError(name)

View File

@ -61,10 +61,10 @@ with open(f'{base}/__init__.py', 'w') as f:
print('# autogenerated by __main__.py do not edit', file=f)
print(f'{top_level_module_names=}', file=f)
print(f'''
def __getattr__(name):
if name in top_level_module_names:
import importlib
return importlib.import_module("{QT_WRAPPER}." + name)
raise AttributeError(name)
''', file=f)