Skip to content

Commit a9ff0e8

Browse files
author
Will Lucas
committed
Add module to sys.modules after loading for use with @DataClass
1 parent 0b99d06 commit a9ff0e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ async def load_module_from_path(module_name, module_path):
145145
# Load the module
146146
spec = importlib.util.spec_from_file_location(module_name, module_path)
147147
module = importlib.util.module_from_spec(spec)
148+
sys.modules[module_name] = module
148149
spec.loader.exec_module(module)
149150
print(f"Loaded module: {module.__name__}")
150151
if hasattr(module, "Pipeline"):

0 commit comments

Comments
 (0)