1
0
forked from VimPlug/jedi

Introduce an additional node parameter for py__iter__ which helps static analysis.

This commit is contained in:
Dave Halter
2015-12-03 11:52:54 +01:00
parent f66b8138b7
commit 8daa0b8784
6 changed files with 41 additions and 35 deletions

View File

@@ -164,8 +164,9 @@ class Evaluator(object):
# Iterate through result and add the values, that's possible
# only in for loops without clutter, because they are
# predictable. Also only do it, if the variable is not a tuple.
for_iterables = self.eval_element(for_stmt.get_input_node())
ordered = list(iterable.py__iter__(self, for_iterables))
node = for_stmt.get_input_node()
for_iterables = self.eval_element(node)
ordered = list(iterable.py__iter__(self, for_iterables, node))
for index_types in ordered:
dct = {str(for_stmt.children[1]): index_types}