1
0
forked from VimPlug/jedi

Refactoring: Make Import.get_all_import_names return NameParts.

This commit is contained in:
Dave Halter
2014-09-19 01:40:05 +02:00
parent 83d2af5138
commit b2342c76be
5 changed files with 13 additions and 28 deletions

View File

@@ -70,11 +70,10 @@ def usages(evaluator, definitions, mods):
if isinstance(stmt, pr.Import):
count = 0
imps = []
for i in stmt.get_all_import_names():
for name_part in i.names:
count += 1
if unicode(name_part) == search_name:
imps.append((count, name_part))
for name in stmt.get_all_import_names():
count += 1
if unicode(name) == search_name:
imps.append((count, name))
for used_count, name_part in imps:
i = imports.ImportWrapper(evaluator, stmt, kill_count=count - used_count,