forked from VimPlug/jedi
Revert "Add get_names_of_scope option to evaluate.get_names_of_scope"
This reverts commit 154662ea273a17f00186546bdf9d75833553d307.
This commit is contained in:
@@ -376,7 +376,7 @@ def get_definitions(scope):
|
|||||||
:rtype: list of Definition
|
:rtype: list of Definition
|
||||||
"""
|
"""
|
||||||
tuples = evaluate.get_names_of_scope(
|
tuples = evaluate.get_names_of_scope(
|
||||||
scope, star_search=False, include_builtin=False, include_parent=False)
|
scope, star_search=False, include_builtin=False)
|
||||||
names = reduce(lambda x, y: x + y[1], tuples, [])
|
names = reduce(lambda x, y: x + y[1], tuples, [])
|
||||||
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)]
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ def get_defined_names_for_position(scope, position=None, start_scope=None):
|
|||||||
|
|
||||||
|
|
||||||
def get_names_of_scope(scope, position=None, star_search=True,
|
def get_names_of_scope(scope, position=None, star_search=True,
|
||||||
include_builtin=True, include_parent=True):
|
include_builtin=True):
|
||||||
"""
|
"""
|
||||||
Get all completions (names) possible for the current scope.
|
Get all completions (names) possible for the current scope.
|
||||||
The star search option is only here to provide an optimization. Otherwise
|
The star search option is only here to provide an optimization. Otherwise
|
||||||
@@ -180,9 +180,6 @@ def get_names_of_scope(scope, position=None, star_search=True,
|
|||||||
# is a list comprehension
|
# is a list comprehension
|
||||||
yield scope, scope.get_set_vars(is_internal_call=True)
|
yield scope, scope.get_set_vars(is_internal_call=True)
|
||||||
|
|
||||||
if not include_parent:
|
|
||||||
return
|
|
||||||
|
|
||||||
scope = scope.parent
|
scope = scope.parent
|
||||||
# This is used, because subscopes (Flow scopes) would distort the
|
# This is used, because subscopes (Flow scopes) would distort the
|
||||||
# results.
|
# results.
|
||||||
|
|||||||
Reference in New Issue
Block a user