mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 13:51:13 +00:00
Python: Fix support for named exports
This commit is contained in:
parent
2d5d53fba8
commit
636de6fc7c
7 changed files with 73 additions and 4 deletions
|
@ -242,9 +242,15 @@ def load_file(path, quiet=False, style=None, include_paths=None, library_paths=N
|
|||
setattr(module, comp_name, wrapper_class)
|
||||
|
||||
for name, struct_or_enum_prototype in result.structs_and_enums.items():
|
||||
name = _normalize_prop(name)
|
||||
struct_wrapper = _build_struct(name, struct_or_enum_prototype)
|
||||
setattr(module, name, struct_wrapper)
|
||||
|
||||
for orig_name, new_name in result.named_exports:
|
||||
orig_name = _normalize_prop(orig_name)
|
||||
new_name = _normalize_prop(new_name)
|
||||
setattr(module, new_name, getattr(module, orig_name))
|
||||
|
||||
return module
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue