summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-01-03 15:30:34 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-01-03 15:30:34 +0100
commit01ea104c1e404de6064303d627eeb63705af6480 (patch)
tree1822c256593a1381f0ebed029ee2cbf1c106086d
parent32ac20b7d941df693cc757a7fc75a225d11c7ee5 (diff)
canonicalize: support »import *«
-rw-r--r--canonicalize/astTools.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/canonicalize/astTools.py b/canonicalize/astTools.py
index b84b2c5..f644316 100644
--- a/canonicalize/astTools.py
+++ b/canonicalize/astTools.py
@@ -32,6 +32,8 @@ def importedName(id, importList):
if imp.module in supportedLibraries:
libMap = libraryMap[imp.module]
for name in imp.names:
+ if name.name == '*' and id in libMap:
+ return True
if hasattr(name, "asname") and name.asname != None:
if id == name.asname:
return True