--- a/Plugins/CheckerPlugins/Tabnanny/Tabnanny.py Thu Mar 09 17:56:06 2017 +0100 +++ b/Plugins/CheckerPlugins/Tabnanny/Tabnanny.py Thu Mar 09 19:28:59 2017 +0100 @@ -448,8 +448,8 @@ indents = [Whitespace("")] check_equal = 0 - for (type, token, start, end, line) in tokens: - if type == NEWLINE: + for (tokenType, token, start, end, line) in tokens: + if tokenType == NEWLINE: # a program statement, or ENDMARKER, will eventually follow, # after some (possibly empty) run of tokens of the form # (NL | COMMENT)* (INDENT | DEDENT+)? @@ -457,7 +457,7 @@ # be undone when we see the INDENT. check_equal = 1 - elif type == INDENT: + elif tokenType == INDENT: check_equal = 0 thisguy = Whitespace(token) if not indents[-1].less(thisguy): @@ -466,7 +466,7 @@ raise NannyNag(start[0], msg, line) indents.append(thisguy) - elif type == DEDENT: + elif tokenType == DEDENT: # there's nothing we need to check here! what's important is # that when the run of DEDENTs ends, the indentation of the # program statement (or ENDMARKER) that triggered the run is @@ -481,7 +481,7 @@ del indents[-1] - elif check_equal and type not in JUNK: + elif check_equal and tokenType not in JUNK: # this is the first "real token" following a NEWLINE, so it # must be the first token of the next program statement, or an # ENDMARKER; the "line" argument exposes the leading whitespace