Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-T-G authored Jan 17, 2025
1 parent f9ea232 commit 8175207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoimport/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def lazy_import(name, globals=None, locals=None, fromlist=(), level=0):
if "." in name: # we need to only return parent package
module_name = name.split('.')[0]

if globals is not None and module_name in globals:
if globals and module_name in globals:
self._lazy_modules[module_name] = globals[module_name]
elif module_name in sys.modules:
self._lazy_modules[module_name] = sys.modules[module_name] # module already loaded in session
Expand Down

0 comments on commit 8175207

Please sign in to comment.