1
0
forked from VimPlug/jedi

another parser issue, very much related to the last one. sometimes a None element was used as a token.fixes #418

This commit is contained in:
Dave Halter
2014-07-18 15:10:10 +02:00
parent 0dea47b260
commit 21341283ca
2 changed files with 8 additions and 1 deletions

View File

@@ -1073,7 +1073,8 @@ isinstance(c, (tokenize.Token, Operator)) else unicode(c)
end_pos = end_pos[0], end_pos[1] - 1
break
token_list.append(tok)
if tok is not None: # Can be None, because of lambda/for.
token_list.append(tok)
if not token_list:
return None, tok