* Replaced token tuple with token class

* Fixed PEP8 where I read code
This commit is contained in:
Jean-Louis Fuchs
2013-12-05 23:34:20 +01:00
parent 099fe4eeb3
commit 989e12e8a7
4 changed files with 34 additions and 14 deletions

View File

@@ -146,8 +146,13 @@ class NoErrorTokenizer(object):
if self.is_fast_parser \
and self.previous[0] in (tokenize.INDENT, tokenize.NL, None,
tokenize.NEWLINE, tokenize.DEDENT) \
and c[0] not in (tokenize.COMMENT, tokenize.INDENT,
tokenize.NL, tokenize.NEWLINE, tokenize.DEDENT):
and c[0] not in (
tokenize.COMMENT,
tokenize.INDENT,
tokenize.NL,
tokenize.NEWLINE,
tokenize.DEDENT
):
# print c, tokenize.tok_name[c[0]]
tok = c[1]