1
0
forked from VimPlug/jedi

goto / related_name fixed -> tests are passing again

This commit is contained in:
David Halter
2012-09-22 15:15:21 +02:00
parent 0c71a9d86a
commit 4735126f1b
5 changed files with 77 additions and 74 deletions
+8 -7
View File
@@ -1148,6 +1148,14 @@ class PyFuzzyParser(object):
self._tokenize_end_pos[1])
def _check_user_stmt(self, simple):
if not isinstance(simple, Param):
for tok_name in self.module.temp_used_names:
try:
self.module.used_names[tok_name].add(simple)
except KeyError:
self.module.used_names[tok_name] = set([simple])
self.module.temp_used_names = []
if not self.user_position:
return
# the position is right
@@ -1517,13 +1525,6 @@ class PyFuzzyParser(object):
stmt = stmt_class(string, set_vars, used_funcs, used_vars, \
tok_list, first_pos, self.end_pos)
self._check_user_stmt(stmt)
if not isinstance(stmt, Param):
for tok_name in self.module.temp_used_names:
try:
self.module.used_names[tok_name].add(stmt)
except KeyError:
self.module.used_names[tok_name] = set([stmt])
self.module.temp_used_names = []
if is_return:
# add returns to the scope
func = self.scope.get_parent_until(Function)