1
0
forked from VimPlug/jedi

remove get_set_vars completely from existance

This commit is contained in:
Dave Halter
2014-04-14 12:40:59 +02:00
parent 237af765b7
commit 6a40c9b671
9 changed files with 37 additions and 52 deletions

View File

@@ -142,7 +142,7 @@ class Evaluator(object):
result = left
else:
result = precedence.calculate(self, left, operator, result)
elif len(stmt.get_set_vars()) > 1 and seek_name and ass_details:
elif len(stmt.get_defined_names()) > 1 and seek_name and ass_details:
# Assignment checking is only important if the statement defines
# multiple variables.
new_result = []

View File

@@ -447,7 +447,7 @@ def get_names_of_scope(evaluator, scope, position=None, star_search=True, includ
reraise(common.MultiLevelStopIteration, sys.exc_info()[2])
if scope.isinstance(pr.ForFlow) and scope.is_list_comp:
# is a list comprehension
yield scope, scope.get_set_vars(is_internal_call=True)
yield scope, scope.get_defined_names(is_internal_call=True)
scope = scope.parent
# This is used, because subscopes (Flow scopes) would distort the

View File

@@ -14,7 +14,7 @@ def fast_parent_copy(obj):
if isinstance(obj, pr.Statement):
# Need to set _set_vars, otherwise the cache is not working
# correctly, don't know why.
obj.get_set_vars()
obj.get_defined_names()
new_obj = copy.copy(obj)
new_elements[obj] = new_obj

View File

@@ -109,7 +109,7 @@ class Instance(use_metaclass(CachedMetaClass, Executable)):
# because to follow them and their self variables is too
# complicated.
sub = self._get_method_execution(sub)
for n in sub.get_set_vars():
for n in sub.get_defined_names():
# Only names with the selfname are being added.
# It is also important, that they have a len() of 2,
# because otherwise, they are just something else
@@ -446,9 +446,7 @@ class FunctionExecution(Executable):
Call the default method with the own instance (self implements all
the necessary functions). Add also the params.
"""
return self._get_params() + pr.Scope.get_set_vars(self)
get_set_vars = get_defined_names
return self._get_params() + pr.Scope.get_defined_names(self)
def _copy_properties(self, prop):
"""