mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
Last fixes, because of the Name.get_definition change. The recent parser.representation changes are now fully working and we're ready to improve Evaluator.goto again.
This commit is contained in:
@@ -46,7 +46,7 @@ def _get_calling_var_args(evaluator, var_args):
|
|||||||
names = evaluator.goto(argument, [exp_list[1].get_code()])
|
names = evaluator.goto(argument, [exp_list[1].get_code()])
|
||||||
if len(names) != 1:
|
if len(names) != 1:
|
||||||
break
|
break
|
||||||
param = names[0].parent
|
param = names[0].get_definition()
|
||||||
if not isinstance(param, ExecutedParam):
|
if not isinstance(param, ExecutedParam):
|
||||||
if isinstance(param, pr.Param):
|
if isinstance(param, pr.Param):
|
||||||
# There is no calling var_args in this case - there's just
|
# There is no calling var_args in this case - there's just
|
||||||
|
|||||||
@@ -130,5 +130,5 @@ def test_goto_definition_not_multiple():
|
|||||||
|
|
||||||
|
|
||||||
def test_usage_description():
|
def test_usage_description():
|
||||||
for u in api.Script('foo = ''; foo').usages():
|
descs = [u.description for u in api.Script("foo = ''; foo").usages()]
|
||||||
assert u.description == 'foo'
|
assert set(descs) == {"foo = ''", 'foo'}
|
||||||
|
|||||||
Reference in New Issue
Block a user