Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Yasin <[email protected]>
  • Loading branch information
Y-T-G authored Jan 16, 2025
1 parent cfd3608 commit 3442082
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 @@ -94,7 +94,7 @@ def __exit__(self, *args):
parents = ['.'.join(parts[:i]) for i in range(1, len(parts))]
for parent in parents:
p = self._globals.get(parent, None)
if p is None or isinstance(p, LazyLoader) or p.__name__ == name:
if p is None or p.__name__ == name:
# handle subpackage imports
self._globals[parent] = sys.modules.get(parent, LazyLoader(parent))

Expand Down

0 comments on commit 3442082

Please sign in to comment.