forked from VimPlug/jedi
Use the first item returned by get_names_of_scope
This commit is contained in:
+3
-3
@@ -375,9 +375,9 @@ def get_definitions(scope):
|
|||||||
:type scope: Scope
|
:type scope: Scope
|
||||||
:rtype: list of Definition
|
:rtype: list of Definition
|
||||||
"""
|
"""
|
||||||
tuples = evaluate.get_names_of_scope(
|
pair = next(evaluate.get_names_of_scope(
|
||||||
scope, star_search=False, include_builtin=False)
|
scope, star_search=False, include_builtin=False), None)
|
||||||
names = reduce(lambda x, y: x + y[1], tuples, [])
|
names = pair[1] if pair else []
|
||||||
return [Definition(d) for d in sorted(names, key=lambda s: s.start_pos)]
|
return [Definition(d) for d in sorted(names, key=lambda s: s.start_pos)]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user