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

@@ -301,7 +301,7 @@ def _name_to_types(evaluator, name, scope):
typ = name.get_definition()
if typ.isinstance(tree.ForStmt, tree.CompFor):
container_types = evaluator.eval_element(typ.children[3])
for_types = iterable.py__iter__types(evaluator, container_types)
for_types = iterable.py__iter__types(evaluator, container_types, typ.children[3])
types = check_tuple_assignments(for_types, name)
elif isinstance(typ, tree.Param):
types = _eval_param(evaluator, typ, scope)