1
0
forked from VimPlug/jedi

invalid for loops completion should work now

This commit is contained in:
David Halter
2012-10-01 09:51:57 +02:00
parent eda2430ad7
commit 74fe520597
3 changed files with 12 additions and 1 deletions

View File

@@ -1691,7 +1691,8 @@ class PyFuzzyParser(object):
if tok == 'in':
statement, tok = self._parse_statement()
if tok == ':':
f = ForFlow([statement], first_pos, set_stmt)
s = [] if statement is None else [statement]
f = ForFlow(s, first_pos, set_stmt)
self.scope = self.scope.add_statement(f)
elif tok in ['if', 'while', 'try', 'with'] + extended_flow: