Remove search_name and search_name_part from goto returns.

The search_name can be retrieved by checking definitions for it. Definitions should always be names or even better name_parts in case of goto. Therefore we can just get it there.
This commit is contained in:
Dave Halter
2014-09-03 23:28:19 +02:00
parent f7a1c110ba
commit fb10199f37
5 changed files with 16 additions and 18 deletions
+3 -2
View File
@@ -6,7 +6,7 @@ from jedi.evaluate import imports
from jedi.evaluate import helpers
def usages(evaluator, definitions, search_name, mods):
def usages(evaluator, definitions, mods):
def compare_array(definitions):
""" `definitions` are being compared by module/start_pos, because
sometimes the id's of the objects change (e.g. executions).
@@ -37,7 +37,8 @@ def usages(evaluator, definitions, search_name, mods):
follow.append(call_path[:i + 1])
for call_path in follow:
follow_res, search = evaluator.goto(call.parent, call_path)
follow_res = evaluator.goto(call.parent, call_path)
search = call_path[-1]
# names can change (getattr stuff), therefore filter names that
# don't match `search`.