Skip to content

Commit

Permalink
Merge pull request #1474 from Jaseci-Labs/splice-orc-update
Browse files Browse the repository at this point in the history
Splice orc: Support for from module import ClassName Syntax
  • Loading branch information
marsninja authored Nov 29, 2024
2 parents feadbae + f36e878 commit 816ff39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion jac-splice-orc/jac_splice_orc/plugin/splice_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,16 @@ def jac_import(
remote_module_proxy = proxy.get_module_proxy(
module_name=target, module_config=module_config[target]
)
return (remote_module_proxy,)
if items:
imported_items = []
for item_name, item_alias in items.items():
item = getattr(remote_module_proxy, item_name)
if item_alias:
item.__name__ = item_alias
imported_items.append(item)
return tuple(imported_items)
else:
return (remote_module_proxy,)
spec = ImportPathSpec(
target,
base_path,
Expand Down

0 comments on commit 816ff39

Please sign in to comment.