Skip to content

Commit 31eea2e

Browse files
committed
fix(require.py): python.load should use the module.exports dict instead of taking the Pythonic exports
1 parent 7eeaa90 commit 31eea2e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/pythonmonkey/require.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,7 @@ def load(filename: str) -> Dict:
208208
spec.loader.exec_module(module)
209209
else:
210210
module = sys.modules[name]
211-
module_exports = {}
212-
for key in dir(module):
213-
module_exports[key] = getattr(module, key)
214-
return module_exports
211+
return module.exports
215212
globalThis.python.load = load
216213

217214
"""

0 commit comments

Comments
 (0)