forked from VimPlug/jedi
ImportPath has now also an _evaluator
This commit is contained in:
@@ -504,7 +504,7 @@ def usages(definitions, search_name, mods):
|
||||
imps.append((count, name_part))
|
||||
|
||||
for used_count, name_part in imps:
|
||||
i = imports.ImportPath(stmt, kill_count=count - used_count,
|
||||
i = imports.ImportPath(_evaluator, stmt, kill_count=count - used_count,
|
||||
direct_resolve=True)
|
||||
f = i.follow(is_goto=True)
|
||||
if set(f) & set(definitions):
|
||||
@@ -521,7 +521,7 @@ def usages_add_import_modules(definitions, search_name):
|
||||
new = set()
|
||||
for d in definitions:
|
||||
if isinstance(d.parent, pr.Import):
|
||||
s = imports.ImportPath(d.parent, direct_resolve=True)
|
||||
s = imports.ImportPath(_evaluator, d.parent, direct_resolve=True)
|
||||
with common.ignored(IndexError):
|
||||
new.add(s.follow(is_goto=True)[0])
|
||||
return set(definitions) | new
|
||||
|
||||
Reference in New Issue
Block a user