static analysis: Import tests working again.

This commit is contained in:
Dave Halter
2014-12-11 16:25:18 +01:00
parent 6818d3affa
commit 77fdbac234
3 changed files with 13 additions and 6 deletions
+2
View File
@@ -216,6 +216,8 @@ def get_module_statements(module):
for scope in module.walk():
for imp in set(scope.imports):
import_names |= set(imp.get_defined_names())
if imp.is_nested():
import_names |= set(path[-1] for path in imp.paths())
stmts |= add_stmts(scope.statements)
stmts |= add_stmts(r for r in scope.returns if r is not None)