1
0
forked from VimPlug/jedi

Some improvements towards iterators.

This commit is contained in:
Dave Halter
2016-11-12 03:53:25 +01:00
parent 9369d264d4
commit 7848be97ab
5 changed files with 27 additions and 25 deletions

View File

@@ -152,8 +152,7 @@ class Evaluator(object):
operator = copy.copy(first_operation)
operator.value = operator.value[:-1]
name = str(stmt.get_defined_names()[0])
parent = self.wrap(stmt.get_parent_scope())
left = self.find_types(parent, name, stmt.start_pos, search_global=True)
left = self.find_types(context, name, stmt.start_pos, search_global=True)
for_stmt = stmt.get_parent_until(tree.ForStmt)
if isinstance(for_stmt, tree.ForStmt) and types \
@@ -351,7 +350,7 @@ class Evaluator(object):
elif c[0] == '(' and not len(c) == 2 \
and not(tree.is_node(c[1], 'testlist_comp')
and len(c[1].children) > 1):
return self.eval_element(c[1])
return self.eval_element(context, c[1])
try:
comp_for = c[1].children[1]