We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
clashing_attr
1 parent 13ae98e commit 96c0d95Copy full SHA for 96c0d95
1 file changed
python/ql/test/experimental/import-resolution/main.py
@@ -84,6 +84,10 @@ def local_import():
84
check("clashing_attr", clashing_attr, "clashing_attr", globals()) #$ prints=clashing_attr SPURIOUS: prints="<module attr_clash.clashing_attr>"
85
check("non_clashing_submodule", non_clashing_submodule, "<module attr_clash.non_clashing_submodule>", globals()) #$ prints="<module attr_clash.non_clashing_submodule>"
86
87
+import attr_clash.clashing_attr as _doesnt_matter #$ imports=attr_clash.clashing_attr as=_doesnt_matter
88
+from attr_clash import clashing_attr, non_clashing_submodule #$ imports=attr_clash.clashing_attr as=clashing_attr imports=attr_clash.non_clashing_submodule as=non_clashing_submodule
89
+check("clashing_attr", clashing_attr, "<module attr_clash.clashing_attr>", globals()) #$ prints="<module attr_clash.clashing_attr>" SPURIOUS: prints=clashing_attr
90
+
91
# check that import * only imports the __all__ attributes
92
from has_defined_all import *
93
check("all_defined_foo", all_defined_foo, "all_defined_foo", globals()) #$ prints=all_defined_foo
0 commit comments