Skip to content

Commit ed4f2c6

Browse files
committed
Remove submodules, still check their version
1 parent 1b2a910 commit ed4f2c6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

aikido_zen/sinks/builtins_import.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ def _import(func, instance, args, kwargs, return_value):
1414
return
1515
name = getattr(return_value, "__package__")
1616

17-
if not name or "." in name:
18-
# Make sure the name exists and that it's not a submodule
17+
if not name:
18+
# Make sure the name exists
1919
return
20+
name = name.split(".")[0] # Remove submodules
2021
if name == "importlib_metadata":
2122
# Avoid circular dependencies
2223
return

0 commit comments

Comments
 (0)