<div dir="ltr">Are you planning on removing this after today? My worry about leaving it in is if it's a modified copy that follows your Python 8 April Fools joke then it will quite possibly trip people up who try and run pep8 but don't have it installed, leading them to wonder why the heck their imports are now all flagged as broken.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, 31 Mar 2016 at 14:40 victor.stinner <<a href="mailto:python-checkins@python.org">python-checkins@python.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="https://hg.python.org/cpython/rev/9aedec2dbc01" rel="noreferrer" target="_blank">https://hg.python.org/cpython/rev/9aedec2dbc01</a><br>
changeset:   100818:9aedec2dbc01<br>
user:        Victor Stinner <<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>><br>
date:        Thu Mar 31 23:30:53 2016 +0200<br>
summary:<br>
  Python 8: no pep8, no chocolate!<br>
<br>
files:<br>
  Include/patchlevel.h |     6 +-<br>
  Lib/pep8.py          |  2151 ++++++++++++++++++++++++++++++<br>
  Lib/site.py          |    56 +<br>
  3 files changed, 2210 insertions(+), 3 deletions(-)<br>
<br>
<br>
diff --git a/Include/patchlevel.h b/Include/patchlevel.h<br>
--- a/Include/patchlevel.h<br>
+++ b/Include/patchlevel.h<br>
@@ -16,14 +16,14 @@<br>
<br>
 /* Version parsed out into numeric values */<br>
 /*--start constants--*/<br>
-#define PY_MAJOR_VERSION       3<br>
-#define PY_MINOR_VERSION       6<br>
+#define PY_MAJOR_VERSION       8<br>
+#define PY_MINOR_VERSION       0<br>
 #define PY_MICRO_VERSION       0<br>
 #define PY_RELEASE_LEVEL       PY_RELEASE_LEVEL_ALPHA<br>
 #define PY_RELEASE_SERIAL      0<br>
<br>
 /* Version as a string */<br>
-#define PY_VERSION             "3.6.0a0"<br>
+#define PY_VERSION             "8.0.0a0"<br>
 /*--end constants--*/<br>
<br>
 /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.<br>
diff --git a/Lib/pep8.py b/Lib/pep8.py<br>
new file mode 100644<br>
--- /dev/null<br>
+++ b/Lib/pep8.py<br>
@@ -0,0 +1,2151 @@<br>
+#!/usr/bin/env python<br>
+# pep8.py - Check Python source code formatting, according to PEP 8<br>
+# Copyright (C) 2006-2009 Johann C. Rocholl <<a href="mailto:johann@rocholl.net" target="_blank">johann@rocholl.net</a>><br>
+# Copyright (C) 2009-2014 Florent Xicluna <<a href="mailto:florent.xicluna@gmail.com" target="_blank">florent.xicluna@gmail.com</a>><br>
+# Copyright (C) 2014-2016 Ian Lee <<a href="mailto:ianlee1521@gmail.com" target="_blank">ianlee1521@gmail.com</a>><br>
+#<br>
+# Permission is hereby granted, free of charge, to any person<br>
+# obtaining a copy of this software and associated documentation files<br>
+# (the "Software"), to deal in the Software without restriction,<br>
+# including without limitation the rights to use, copy, modify, merge,<br>
+# publish, distribute, sublicense, and/or sell copies of the Software,<br>
+# and to permit persons to whom the Software is furnished to do so,<br>
+# subject to the following conditions:<br>
+#<br>
+# The above copyright notice and this permission notice shall be<br>
+# included in all copies or substantial portions of the Software.<br>
+#<br>
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,<br>
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND<br>
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS<br>
+# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN<br>
+# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN<br>
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br>
+# SOFTWARE.<br>
+<br>
+r"""<br>
+Check Python source code formatting, according to PEP 8.<br>
+<br>
+For usage and a list of options, try this:<br>
+$ python pep8.py -h<br>
+<br>
+This program and its regression test suite live here:<br>
+<a href="https://github.com/pycqa/pep8" rel="noreferrer" target="_blank">https://github.com/pycqa/pep8</a><br>
+<br>
+Groups of errors and warnings:<br>
+E errors<br>
+W warnings<br>
+100 indentation<br>
+200 whitespace<br>
+300 blank lines<br>
+400 imports<br>
+500 line length<br>
+600 deprecation<br>
+700 statements<br>
+900 syntax error<br>
+"""<br>
+from __future__ import with_statement<br>
+<br>
+import os<br>
+import sys<br>
+import re<br>
+import time<br>
+import inspect<br>
+import keyword<br>
+import tokenize<br>
+from optparse import OptionParser<br>
+from fnmatch import fnmatch<br>
+try:<br>
+    from configparser import RawConfigParser<br>
+    from io import TextIOWrapper<br>
+except ImportError:<br>
+    from ConfigParser import RawConfigParser<br>
+<br>
+__version__ = '1.7.0'<br>
+<br>
+DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox'<br>
+DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704'<br>
+try:<br>
+    if sys.platform == 'win32':<br>
+        USER_CONFIG = os.path.expanduser(r'~\.pep8')<br>
+    else:<br>
+        USER_CONFIG = os.path.join(<br>
+            os.getenv('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'),<br>
+            'pep8'<br>
+        )<br>
+except ImportError:<br>
+    USER_CONFIG = None<br>
+<br>
+PROJECT_CONFIG = ('setup.cfg', 'tox.ini', '.pep8')<br>
+TESTSUITE_PATH = os.path.join(os.path.dirname(__file__), 'testsuite')<br>
+MAX_LINE_LENGTH = 79<br>
+REPORT_FORMAT = {<br>
+    'default': '%(path)s:%(row)d:%(col)d: %(code)s %(text)s',<br>
+    'pylint': '%(path)s:%(row)d: [%(code)s] %(text)s',<br>
+}<br>
+<br>
+PyCF_ONLY_AST = 1024<br>
+SINGLETONS = frozenset(['False', 'None', 'True'])<br>
+KEYWORDS = frozenset(keyword.kwlist + ['print']) - SINGLETONS<br>
+UNARY_OPERATORS = frozenset(['>>', '**', '*', '+', '-'])<br>
+ARITHMETIC_OP = frozenset(['**', '*', '/', '//', '+', '-'])<br>
+WS_OPTIONAL_OPERATORS = ARITHMETIC_OP.union(['^', '&', '|', '<<', '>>', '%'])<br>
+WS_NEEDED_OPERATORS = frozenset([<br>
+    '**=', '*=', '/=', '//=', '+=', '-=', '!=', '<>', '<', '>',<br>
+    '%=', '^=', '&=', '|=', '==', '<=', '>=', '<<=', '>>=', '='])<br>
+WHITESPACE = frozenset(' \t')<br>
+NEWLINE = frozenset([tokenize.NL, tokenize.NEWLINE])<br>
+SKIP_TOKENS = NEWLINE.union([tokenize.INDENT, tokenize.DEDENT])<br>
+# ERRORTOKEN is triggered by backticks in Python 3<br>
+SKIP_COMMENTS = SKIP_TOKENS.union([tokenize.COMMENT, tokenize.ERRORTOKEN])<br>
+BENCHMARK_KEYS = ['directories', 'files', 'logical lines', 'physical lines']<br>
+<br>
+INDENT_REGEX = re.compile(r'([ \t]*)')<br>
+RAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,')<br>
+RERAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,.*,\s*\w+\s*$')<br>
+ERRORCODE_REGEX = re.compile(r'\b[A-Z]\d{3}\b')<br>
+DOCSTRING_REGEX = re.compile(r'u?r?["\']')<br>
+EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')<br>
+WHITESPACE_AFTER_COMMA_REGEX = re.compile(r'[,;:]\s*(?:  |\t)')<br>
+COMPARE_SINGLETON_REGEX = re.compile(r'(\bNone|\bFalse|\bTrue)?\s*([=!]=)'<br>
+                                     r'\s*(?(1)|(None|False|True))\b')<br>
+COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+[^][)(}{ ]+\s+(in|is)\s')<br>
+COMPARE_TYPE_REGEX = re.compile(r'(?:[=!]=|is(?:\s+not)?)\s*type(?:s.\w+Type'<br>
+                                r'|\s*\(\s*([^)]*[^ )])\s*\))')<br>
+KEYWORD_REGEX = re.compile(r'(\s*)\b(?:%s)\b(\s*)' % r'|'.join(KEYWORDS))<br>
+OPERATOR_REGEX = re.compile(r'(?:[^,\s])(\s*)(?:[-+*/|!<=>%&^]+)(\s*)')<br>
+LAMBDA_REGEX = re.compile(r'\blambda\b')<br>
+HUNK_REGEX = re.compile(r'^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$')<br>
+<br>
+# Work around Python < 2.6 behaviour, which does not generate NL after<br>
+# a comment which is on a line by itself.<br>
+COMMENT_WITH_NL = tokenize.generate_tokens(['#\n'].pop).send(None)[1] == '#\n'<br>
+<br>
+<br>
+##############################################################################<br>
+# Plugins (check functions) for physical lines<br>
+##############################################################################<br>
+<br>
+<br>
+def tabs_or_spaces(physical_line, indent_char):<br>
+    r"""Never mix tabs and spaces.<br>
+<br>
+    The most popular way of indenting Python is with spaces only.  The<br>
+    second-most popular way is with tabs only.  Code indented with a mixture<br>
+    of tabs and spaces should be converted to using spaces exclusively.  When<br>
+    invoking the Python command line interpreter with the -t option, it issues<br>
+    warnings about code that illegally mixes tabs and spaces.  When using -tt<br>
+    these warnings become errors.  These options are highly recommended!<br>
+<br>
+    Okay: if a == 0:\n        a = 1\n        b = 1<br>
+    E101: if a == 0:\n        a = 1\n\tb = 1<br>
+    """<br>
+    indent = INDENT_REGEX.match(physical_line).group(1)<br>
+    for offset, char in enumerate(indent):<br>
+        if char != indent_char:<br>
+            return offset, "E101 indentation contains mixed spaces and tabs"<br>
+<br>
+<br>
+def tabs_obsolete(physical_line):<br>
+    r"""For new projects, spaces-only are strongly recommended over tabs.<br>
+<br>
+    Okay: if True:\n    return<br>
+    W191: if True:\n\treturn<br>
+    """<br>
+    indent = INDENT_REGEX.match(physical_line).group(1)<br>
+    if '\t' in indent:<br>
+        return indent.index('\t'), "W191 indentation contains tabs"<br>
+<br>
+<br>
+def trailing_whitespace(physical_line):<br>
+    r"""Trailing whitespace is superfluous.<br>
+<br>
+    The warning returned varies on whether the line itself is blank, for easier<br>
+    filtering for those who want to indent their blank lines.<br>
+<br>
+    Okay: spam(1)\n#<br>
+    W291: spam(1) \n#<br>
+    W293: class Foo(object):\n    \n    bang = 12<br>
+    """<br>
+    physical_line = physical_line.rstrip('\n')    # chr(10), newline<br>
+    physical_line = physical_line.rstrip('\r')    # chr(13), carriage return<br>
+    physical_line = physical_line.rstrip('\x0c')  # chr(12), form feed, ^L<br>
+    stripped = physical_line.rstrip(' \t\v')<br>
+    if physical_line != stripped:<br>
+        if stripped:<br>
+            return len(stripped), "W291 trailing whitespace"<br>
+        else:<br>
+            return 0, "W293 blank line contains whitespace"<br>
+<br>
+<br>
+def trailing_blank_lines(physical_line, lines, line_number, total_lines):<br>
+    r"""Trailing blank lines are superfluous.<br>
+<br>
+    Okay: spam(1)<br>
+    W391: spam(1)\n<br>
+<br>
+    However the last line should end with a new line (warning W292).<br>
+    """<br>
+    if line_number == total_lines:<br>
+        stripped_last_line = physical_line.rstrip()<br>
+        if not stripped_last_line:<br>
+            return 0, "W391 blank line at end of file"<br>
+        if stripped_last_line == physical_line:<br>
+            return len(physical_line), "W292 no newline at end of file"<br>
+<br>
+<br>
+def maximum_line_length(physical_line, max_line_length, multiline):<br>
+    r"""Limit all lines to a maximum of 79 characters.<br>
+<br>
+    There are still many devices around that are limited to 80 character<br>
+    lines; plus, limiting windows to 80 characters makes it possible to have<br>
+    several windows side-by-side.  The default wrapping on such devices looks<br>
+    ugly.  Therefore, please limit all lines to a maximum of 79 characters.<br>
+    For flowing long blocks of text (docstrings or comments), limiting the<br>
+    length to 72 characters is recommended.<br>
+<br>
+    Reports error E501.<br>
+    """<br>
+    line = physical_line.rstrip()<br>
+    length = len(line)<br>
+    if length > max_line_length and not noqa(line):<br>
+        # Special case for long URLs in multi-line docstrings or comments,<br>
+        # but still report the error when the 72 first chars are whitespaces.<br>
+        chunks = line.split()<br>
+        if ((len(chunks) == 1 and multiline) or<br>
+            (len(chunks) == 2 and chunks[0] == '#')) and \<br>
+                len(line) - len(chunks[-1]) < max_line_length - 7:<br>
+            return<br>
+        if hasattr(line, 'decode'):   # Python 2<br>
+            # The line could contain multi-byte characters<br>
+            try:<br>
+                length = len(line.decode('utf-8'))<br>
+            except UnicodeError:<br>
+                pass<br>
+        if length > max_line_length:<br>
+            return (max_line_length, "E501 line too long "<br>
+                    "(%d > %d characters)" % (length, max_line_length))<br>
+<br>
+<br>
+##############################################################################<br>
+# Plugins (check functions) for logical lines<br>
+##############################################################################<br>
+<br>
+<br>
+def blank_lines(logical_line, blank_lines, indent_level, line_number,<br>
+                blank_before, previous_logical, previous_indent_level):<br>
+    r"""Separate top-level function and class definitions with two blank lines.<br>
+<br>
+    Method definitions inside a class are separated by a single blank line.<br>
+<br>
+    Extra blank lines may be used (sparingly) to separate groups of related<br>
+    functions.  Blank lines may be omitted between a bunch of related<br>
+    one-liners (e.g. a set of dummy implementations).<br>
+<br>
+    Use blank lines in functions, sparingly, to indicate logical sections.<br>
+<br>
+    Okay: def a():\n    pass\n\n\ndef b():\n    pass<br>
+    Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass<br>
+<br>
+    E301: class Foo:\n    b = 0\n    def bar():\n        pass<br>
+    E302: def a():\n    pass\n\ndef b(n):\n    pass<br>
+    E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass<br>
+    E303: def a():\n\n\n\n    pass<br>
+    E304: @decorator\n\ndef a():\n    pass<br>
+    """<br>
+    if line_number < 3 and not previous_logical:<br>
+        return  # Don't expect blank lines before the first line<br>
+    if previous_logical.startswith('@'):<br>
+        if blank_lines:<br>
+            yield 0, "E304 blank lines found after function decorator"<br>
+    elif blank_lines > 2 or (indent_level and blank_lines == 2):<br>
+        yield 0, "E303 too many blank lines (%d)" % blank_lines<br>
+    elif logical_line.startswith(('def ', 'class ', '@')):<br>
+        if indent_level:<br>
+            if not (blank_before or previous_indent_level < indent_level or<br>
+                    DOCSTRING_REGEX.match(previous_logical)):<br>
+                yield 0, "E301 expected 1 blank line, found 0"<br>
+        elif blank_before != 2:<br>
+            yield 0, "E302 expected 2 blank lines, found %d" % blank_before<br>
+<br>
+<br>
+def extraneous_whitespace(logical_line):<br>
+    r"""Avoid extraneous whitespace.<br>
+<br>
+    Avoid extraneous whitespace in these situations:<br>
+    - Immediately inside parentheses, brackets or braces.<br>
+    - Immediately before a comma, semicolon, or colon.<br>
+<br>
+    Okay: spam(ham[1], {eggs: 2})<br>
+    E201: spam( ham[1], {eggs: 2})<br>
+    E201: spam(ham[ 1], {eggs: 2})<br>
+    E201: spam(ham[1], { eggs: 2})<br>
+    E202: spam(ham[1], {eggs: 2} )<br>
+    E202: spam(ham[1 ], {eggs: 2})<br>
+    E202: spam(ham[1], {eggs: 2 })<br>
+<br>
+    E203: if x == 4: print x, y; x, y = y , x<br>
+    E203: if x == 4: print x, y ; x, y = y, x<br>
+    E203: if x == 4 : print x, y; x, y = y, x<br>
+    """<br>
+    line = logical_line<br>
+    for match in EXTRANEOUS_WHITESPACE_REGEX.finditer(line):<br>
+        text = match.group()<br>
+        char = text.strip()<br>
+        found = match.start()<br>
+        if text == char + ' ':<br>
+            # assert char in '([{'<br>
+            yield found + 1, "E201 whitespace after '%s'" % char<br>
+        elif line[found - 1] != ',':<br>
+            code = ('E202' if char in '}])' else 'E203')  # if char in ',;:'<br>
+            yield found, "%s whitespace before '%s'" % (code, char)<br>
+<br>
+<br>
+def whitespace_around_keywords(logical_line):<br>
+    r"""Avoid extraneous whitespace around keywords.<br>
+<br>
+    Okay: True and False<br>
+    E271: True and  False<br>
+    E272: True  and False<br>
+    E273: True and\tFalse<br>
+    E274: True\tand False<br>
+    """<br>
+    for match in KEYWORD_REGEX.finditer(logical_line):<br>
+        before, after = match.groups()<br>
+<br>
+        if '\t' in before:<br>
+            yield match.start(1), "E274 tab before keyword"<br>
+        elif len(before) > 1:<br>
+            yield match.start(1), "E272 multiple spaces before keyword"<br>
+<br>
+        if '\t' in after:<br>
+            yield match.start(2), "E273 tab after keyword"<br>
+        elif len(after) > 1:<br>
+            yield match.start(2), "E271 multiple spaces after keyword"<br>
+<br>
+<br>
+def missing_whitespace(logical_line):<br>
+    r"""Each comma, semicolon or colon should be followed by whitespace.<br>
+<br>
+    Okay: [a, b]<br>
+    Okay: (3,)<br>
+    Okay: a[1:4]<br>
+    Okay: a[:4]<br>
+    Okay: a[1:]<br>
+    Okay: a[1:4:2]<br>
+    E231: ['a','b']<br>
+    E231: foo(bar,baz)<br>
+    E231: [{'a':'b'}]<br>
+    """<br>
+    line = logical_line<br>
+    for index in range(len(line) - 1):<br>
+        char = line[index]<br>
+        if char in ',;:' and line[index + 1] not in WHITESPACE:<br>
+            before = line[:index]<br>
+            if char == ':' and before.count('[') > before.count(']') and \<br>
+                    before.rfind('{') < before.rfind('['):<br>
+                continue  # Slice syntax, no space required<br>
+            if char == ',' and line[index + 1] == ')':<br>
+                continue  # Allow tuple with only one element: (3,)<br>
+            yield index, "E231 missing whitespace after '%s'" % char<br>
+<br>
+<br>
+def indentation(logical_line, previous_logical, indent_char,<br>
+                indent_level, previous_indent_level):<br>
+    r"""Use 4 spaces per indentation level.<br>
+<br>
+    For really old code that you don't want to mess up, you can continue to<br>
+    use 8-space tabs.<br>
+<br>
+    Okay: a = 1<br>
+    Okay: if a == 0:\n    a = 1<br>
+    E111:   a = 1<br>
+    E114:   # a = 1<br>
+<br>
+    Okay: for item in items:\n    pass<br>
+    E112: for item in items:\npass<br>
+    E115: for item in items:\n# Hi\n    pass<br>
+<br>
+    Okay: a = 1\nb = 2<br>
+    E113: a = 1\n    b = 2<br>
+    E116: a = 1\n    # b = 2<br>
+    """<br>
+    c = 0 if logical_line else 3<br>
+    tmpl = "E11%d %s" if logical_line else "E11%d %s (comment)"<br>
+    if indent_level % 4:<br>
+        yield 0, tmpl % (1 + c, "indentation is not a multiple of four")<br>
+    indent_expect = previous_logical.endswith(':')<br>
+    if indent_expect and indent_level <= previous_indent_level:<br>
+        yield 0, tmpl % (2 + c, "expected an indented block")<br>
+    elif not indent_expect and indent_level > previous_indent_level:<br>
+        yield 0, tmpl % (3 + c, "unexpected indentation")<br>
+<br>
+<br>
+def continued_indentation(logical_line, tokens, indent_level, hang_closing,<br>
+                          indent_char, noqa, verbose):<br>
+    r"""Continuation lines indentation.<br>
+<br>
+    Continuation lines should align wrapped elements either vertically<br>
+    using Python's implicit line joining inside parentheses, brackets<br>
+    and braces, or using a hanging indent.<br>
+<br>
+    When using a hanging indent these considerations should be applied:<br>
+    - there should be no arguments on the first line, and<br>
+    - further indentation should be used to clearly distinguish itself as a<br>
+      continuation line.<br>
+<br>
+    Okay: a = (\n)<br>
+    E123: a = (\n    )<br>
+<br>
+    Okay: a = (\n    42)<br>
+    E121: a = (\n   42)<br>
+    E122: a = (\n42)<br>
+    E123: a = (\n    42\n    )<br>
+    E124: a = (24,\n     42\n)<br>
+    E125: if (\n    b):\n    pass<br>
+    E126: a = (\n        42)<br>
+    E127: a = (24,\n      42)<br>
+    E128: a = (24,\n    42)<br>
+    E129: if (a or\n    b):\n    pass<br>
+    E131: a = (\n    42\n 24)<br>
+    """<br>
+    first_row = tokens[0][2][0]<br>
+    nrows = 1 + tokens[-1][2][0] - first_row<br>
+    if noqa or nrows == 1:<br>
+        return<br>
+<br>
+    # indent_next tells us whether the next block is indented; assuming<br>
+    # that it is indented by 4 spaces, then we should not allow 4-space<br>
+    # indents on the final continuation line; in turn, some other<br>
+    # indents are allowed to have an extra 4 spaces.<br>
+    indent_next = logical_line.endswith(':')<br>
+<br>
+    row = depth = 0<br>
+    valid_hangs = (4,) if indent_char != '\t' else (4, 8)<br>
+    # remember how many brackets were opened on each line<br>
+    parens = [0] * nrows<br>
+    # relative indents of physical lines<br>
+    rel_indent = [0] * nrows<br>
+    # for each depth, collect a list of opening rows<br>
+    open_rows = [[0]]<br>
+    # for each depth, memorize the hanging indentation<br>
+    hangs = [None]<br>
+    # visual indents<br>
+    indent_chances = {}<br>
+    last_indent = tokens[0][2]<br>
+    visual_indent = None<br>
+    last_token_multiline = False<br>
+    # for each depth, memorize the visual indent column<br>
+    indent = [last_indent[1]]<br>
+    if verbose >= 3:<br>
+        print(">>> " + tokens[0][4].rstrip())<br>
+<br>
+    for token_type, text, start, end, line in tokens:<br>
+<br>
+        newline = row < start[0] - first_row<br>
+        if newline:<br>
+            row = start[0] - first_row<br>
+            newline = not last_token_multiline and token_type not in NEWLINE<br>
+<br>
+        if newline:<br>
+            # this is the beginning of a continuation line.<br>
+            last_indent = start<br>
+            if verbose >= 3:<br>
+                print("... " + line.rstrip())<br>
+<br>
+            # record the initial indent.<br>
+            rel_indent[row] = expand_indent(line) - indent_level<br>
+<br>
+            # identify closing bracket<br>
+            close_bracket = (token_type == tokenize.OP and text in ']})')<br>
+<br>
+            # is the indent relative to an opening bracket line?<br>
+            for open_row in reversed(open_rows[depth]):<br>
+                hang = rel_indent[row] - rel_indent[open_row]<br>
+                hanging_indent = hang in valid_hangs<br>
+                if hanging_indent:<br>
+                    break<br>
+            if hangs[depth]:<br>
+                hanging_indent = (hang == hangs[depth])<br>
+            # is there any chance of visual indent?<br>
+            visual_indent = (not close_bracket and hang > 0 and<br>
+                             indent_chances.get(start[1]))<br>
+<br>
+            if close_bracket and indent[depth]:<br>
+                # closing bracket for visual indent<br>
+                if start[1] != indent[depth]:<br>
+                    yield (start, "E124 closing bracket does not match "<br>
+                           "visual indentation")<br>
+            elif close_bracket and not hang:<br>
+                # closing bracket matches indentation of opening bracket's line<br>
+                if hang_closing:<br>
+                    yield start, "E133 closing bracket is missing indentation"<br>
+            elif indent[depth] and start[1] < indent[depth]:<br>
+                if visual_indent is not True:<br>
+                    # visual indent is broken<br>
+                    yield (start, "E128 continuation line "<br>
+                           "under-indented for visual indent")<br>
+            elif hanging_indent or (indent_next and rel_indent[row] == 8):<br>
+                # hanging indent is verified<br>
+                if close_bracket and not hang_closing:<br>
+                    yield (start, "E123 closing bracket does not match "<br>
+                           "indentation of opening bracket's line")<br>
+                hangs[depth] = hang<br>
+            elif visual_indent is True:<br>
+                # visual indent is verified<br>
+                indent[depth] = start[1]<br>
+            elif visual_indent in (text, str):<br>
+                # ignore token lined up with matching one from a previous line<br>
+                pass<br>
+            else:<br>
+                # indent is broken<br>
+                if hang <= 0:<br>
+                    error = "E122", "missing indentation or outdented"<br>
+                elif indent[depth]:<br>
+                    error = "E127", "over-indented for visual indent"<br>
+                elif not close_bracket and hangs[depth]:<br>
+                    error = "E131", "unaligned for hanging indent"<br>
+                else:<br>
+                    hangs[depth] = hang<br>
+                    if hang > 4:<br>
+                        error = "E126", "over-indented for hanging indent"<br>
+                    else:<br>
+                        error = "E121", "under-indented for hanging indent"<br>
+                yield start, "%s continuation line %s" % error<br>
+<br>
+        # look for visual indenting<br>
+        if (parens[row] and<br>
+                token_type not in (tokenize.NL, tokenize.COMMENT) and<br>
+                not indent[depth]):<br>
+            indent[depth] = start[1]<br>
+            indent_chances[start[1]] = True<br>
+            if verbose >= 4:<br>
+                print("bracket depth %s indent to %s" % (depth, start[1]))<br>
+        # deal with implicit string concatenation<br>
+        elif (token_type in (tokenize.STRING, tokenize.COMMENT) or<br>
+              text in ('u', 'ur', 'b', 'br')):<br>
+            indent_chances[start[1]] = str<br>
+        # special case for the "if" statement because len("if (") == 4<br>
+        elif not indent_chances and not row and not depth and text == 'if':<br>
+            indent_chances[end[1] + 1] = True<br>
+        elif text == ':' and line[end[1]:].isspace():<br>
+            open_rows[depth].append(row)<br>
+<br>
+        # keep track of bracket depth<br>
+        if token_type == tokenize.OP:<br>
+            if text in '([{':<br>
+                depth += 1<br>
+                indent.append(0)<br>
+                hangs.append(None)<br>
+                if len(open_rows) == depth:<br>
+                    open_rows.append([])<br>
+                open_rows[depth].append(row)<br>
+                parens[row] += 1<br>
+                if verbose >= 4:<br>
+                    print("bracket depth %s seen, col %s, visual min = %s" %<br>
+                          (depth, start[1], indent[depth]))<br>
+            elif text in ')]}' and depth > 0:<br>
+                # parent indents should not be more than this one<br>
+                prev_indent = indent.pop() or last_indent[1]<br>
+                hangs.pop()<br>
+                for d in range(depth):<br>
+                    if indent[d] > prev_indent:<br>
+                        indent[d] = 0<br>
+                for ind in list(indent_chances):<br>
+                    if ind >= prev_indent:<br>
+                        del indent_chances[ind]<br>
+                del open_rows[depth + 1:]<br>
+                depth -= 1<br>
+                if depth:<br>
+                    indent_chances[indent[depth]] = True<br>
+                for idx in range(row, -1, -1):<br>
+                    if parens[idx]:<br>
+                        parens[idx] -= 1<br>
+                        break<br>
+            assert len(indent) == depth + 1<br>
+            if start[1] not in indent_chances:<br>
+                # allow to line up tokens<br>
+                indent_chances[start[1]] = text<br>
+<br>
+        last_token_multiline = (start[0] != end[0])<br>
+        if last_token_multiline:<br>
+            rel_indent[end[0] - first_row] = rel_indent[row]<br>
+<br>
+    if indent_next and expand_indent(line) == indent_level + 4:<br>
+        pos = (start[0], indent[0] + 4)<br>
+        if visual_indent:<br>
+            code = "E129 visually indented line"<br>
+        else:<br>
+            code = "E125 continuation line"<br>
+        yield pos, "%s with same indent as next logical line" % code<br>
+<br>
+<br>
+def whitespace_before_parameters(logical_line, tokens):<br>
+    r"""Avoid extraneous whitespace.<br>
+<br>
+    Avoid extraneous whitespace in the following situations:<br>
+    - before the open parenthesis that starts the argument list of a<br>
+      function call.<br>
+    - before the open parenthesis that starts an indexing or slicing.<br>
+<br>
+    Okay: spam(1)<br>
+    E211: spam (1)<br>
+<br>
+    Okay: dict['key'] = list[index]<br>
+    E211: dict ['key'] = list[index]<br>
+    E211: dict['key'] = list [index]<br>
+    """<br>
+    prev_type, prev_text, __, prev_end, __ = tokens[0]<br>
+    for index in range(1, len(tokens)):<br>
+        token_type, text, start, end, __ = tokens[index]<br>
+        if (token_type == tokenize.OP and<br>
+            text in '([' and<br>
+            start != prev_end and<br>
+            (prev_type == tokenize.NAME or prev_text in '}])') and<br>
+            # Syntax "class A (B):" is allowed, but avoid it<br>
+            (index < 2 or tokens[index - 2][1] != 'class') and<br>
+                # Allow "return (a.foo for a in range(5))"<br>
+                not keyword.iskeyword(prev_text)):<br>
+            yield prev_end, "E211 whitespace before '%s'" % text<br>
+        prev_type = token_type<br>
+        prev_text = text<br>
+        prev_end = end<br>
+<br>
+<br>
+def whitespace_around_operator(logical_line):<br>
+    r"""Avoid extraneous whitespace around an operator.<br>
+<br>
+    Okay: a = 12 + 3<br>
+    E221: a = 4  + 5<br>
+    E222: a = 4 +  5<br>
+    E223: a = 4\t+ 5<br>
+    E224: a = 4 +\t5<br>
+    """<br>
+    for match in OPERATOR_REGEX.finditer(logical_line):<br>
+        before, after = match.groups()<br>
+<br>
+        if '\t' in before:<br>
+            yield match.start(1), "E223 tab before operator"<br>
+        elif len(before) > 1:<br>
+            yield match.start(1), "E221 multiple spaces before operator"<br>
+<br>
+        if '\t' in after:<br>
+            yield match.start(2), "E224 tab after operator"<br>
+        elif len(after) > 1:<br>
+            yield match.start(2), "E222 multiple spaces after operator"<br>
+<br>
+<br>
+def missing_whitespace_around_operator(logical_line, tokens):<br>
+    r"""Surround operators with a single space on either side.<br>
+<br>
+    - Always surround these binary operators with a single space on<br>
+      either side: assignment (=), augmented assignment (+=, -= etc.),<br>
+      comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),<br>
+      Booleans (and, or, not).<br>
+<br>
+    - If operators with different priorities are used, consider adding<br>
+      whitespace around the operators with the lowest priorities.<br>
+<br>
+    Okay: i = i + 1<br>
+    Okay: submitted += 1<br>
+    Okay: x = x * 2 - 1<br>
+    Okay: hypot2 = x * x + y * y<br>
+    Okay: c = (a + b) * (a - b)<br>
+    Okay: foo(bar, key='word', *args, **kwargs)<br>
+    Okay: alpha[:-i]<br>
+<br>
+    E225: i=i+1<br>
+    E225: submitted +=1<br>
+    E225: x = x /2 - 1<br>
+    E225: z = x **y<br>
+    E226: c = (a+b) * (a-b)<br>
+    E226: hypot2 = x*x + y*y<br>
+    E227: c = a|b<br>
+    E228: msg = fmt%(errno, errmsg)<br>
+    """<br>
+    parens = 0<br>
+    need_space = False<br>
+    prev_type = tokenize.OP<br>
+    prev_text = prev_end = None<br>
+    for token_type, text, start, end, line in tokens:<br>
+        if token_type in SKIP_COMMENTS:<br>
+            continue<br>
+        if text in ('(', 'lambda'):<br>
+            parens += 1<br>
+        elif text == ')':<br>
+            parens -= 1<br>
+        if need_space:<br>
+            if start != prev_end:<br>
+                # Found a (probably) needed space<br>
+                if need_space is not True and not need_space[1]:<br>
+                    yield (need_space[0],<br>
+                           "E225 missing whitespace around operator")<br>
+                need_space = False<br>
+            elif text == '>' and prev_text in ('<', '-'):<br>
+                # Tolerate the "<>" operator, even if running Python 3<br>
+                # Deal with Python 3's annotated return value "->"<br>
+                pass<br>
+            else:<br>
+                if need_space is True or need_space[1]:<br>
+                    # A needed trailing space was not found<br>
+                    yield prev_end, "E225 missing whitespace around operator"<br>
+                elif prev_text != '**':<br>
+                    code, optype = 'E226', 'arithmetic'<br>
+                    if prev_text == '%':<br>
+                        code, optype = 'E228', 'modulo'<br>
+                    elif prev_text not in ARITHMETIC_OP:<br>
+                        code, optype = 'E227', 'bitwise or shift'<br>
+                    yield (need_space[0], "%s missing whitespace "<br>
+                           "around %s operator" % (code, optype))<br>
+                need_space = False<br>
+        elif token_type == tokenize.OP and prev_end is not None:<br>
+            if text == '=' and parens:<br>
+                # Allow keyword args or defaults: foo(bar=None).<br>
+                pass<br>
+            elif text in WS_NEEDED_OPERATORS:<br>
+                need_space = True<br>
+            elif text in UNARY_OPERATORS:<br>
+                # Check if the operator is being used as a binary operator<br>
+                # Allow unary operators: -123, -x, +1.<br>
+                # Allow argument unpacking: foo(*args, **kwargs).<br>
+                if (prev_text in '}])' if prev_type == tokenize.OP<br>
+                        else prev_text not in KEYWORDS):<br>
+                    need_space = None<br>
+            elif text in WS_OPTIONAL_OPERATORS:<br>
+                need_space = None<br>
+<br>
+            if need_space is None:<br>
+                # Surrounding space is optional, but ensure that<br>
+                # trailing space matches opening space<br>
+                need_space = (prev_end, start != prev_end)<br>
+            elif need_space and start == prev_end:<br>
+                # A needed opening space was not found<br>
+                yield prev_end, "E225 missing whitespace around operator"<br>
+                need_space = False<br>
+        prev_type = token_type<br>
+        prev_text = text<br>
+        prev_end = end<br>
+<br>
+<br>
+def whitespace_around_comma(logical_line):<br>
+    r"""Avoid extraneous whitespace after a comma or a colon.<br>
+<br>
+    Note: these checks are disabled by default<br>
+<br>
+    Okay: a = (1, 2)<br>
+    E241: a = (1,  2)<br>
+    E242: a = (1,\t2)<br>
+    """<br>
+    line = logical_line<br>
+    for m in WHITESPACE_AFTER_COMMA_REGEX.finditer(line):<br>
+        found = m.start() + 1<br>
+        if '\t' in m.group():<br>
+            yield found, "E242 tab after '%s'" % m.group()[0]<br>
+        else:<br>
+            yield found, "E241 multiple spaces after '%s'" % m.group()[0]<br>
+<br>
+<br>
+def whitespace_around_named_parameter_equals(logical_line, tokens):<br>
+    r"""Don't use spaces around the '=' sign in function arguments.<br>
+<br>
+    Don't use spaces around the '=' sign when used to indicate a<br>
+    keyword argument or a default parameter value.<br>
+<br>
+    Okay: def complex(real, imag=0.0):<br>
+    Okay: return magic(r=real, i=imag)<br>
+    Okay: boolean(a == b)<br>
+    Okay: boolean(a != b)<br>
+    Okay: boolean(a <= b)<br>
+    Okay: boolean(a >= b)<br>
+    Okay: def foo(arg: int = 42):<br>
+<br>
+    E251: def complex(real, imag = 0.0):<br>
+    E251: return magic(r = real, i = imag)<br>
+    """<br>
+    parens = 0<br>
+    no_space = False<br>
+    prev_end = None<br>
+    annotated_func_arg = False<br>
+    in_def = logical_line.startswith('def')<br>
+    message = "E251 unexpected spaces around keyword / parameter equals"<br>
+    for token_type, text, start, end, line in tokens:<br>
+        if token_type == tokenize.NL:<br>
+            continue<br>
+        if no_space:<br>
+            no_space = False<br>
+            if start != prev_end:<br>
+                yield (prev_end, message)<br>
+        if token_type == tokenize.OP:<br>
+            if text == '(':<br>
+                parens += 1<br>
+            elif text == ')':<br>
+                parens -= 1<br>
+            elif in_def and text == ':' and parens == 1:<br>
+                annotated_func_arg = True<br>
+            elif parens and text == ',' and parens == 1:<br>
+                annotated_func_arg = False<br>
+            elif parens and text == '=' and not annotated_func_arg:<br>
+                no_space = True<br>
+                if start != prev_end:<br>
+                    yield (prev_end, message)<br>
+            if not parens:<br>
+                annotated_func_arg = False<br>
+<br>
+        prev_end = end<br>
+<br>
+<br>
+def whitespace_before_comment(logical_line, tokens):<br>
+    r"""Separate inline comments by at least two spaces.<br>
+<br>
+    An inline comment is a comment on the same line as a statement.  Inline<br>
+    comments should be separated by at least two spaces from the statement.<br>
+    They should start with a # and a single space.<br>
+<br>
+    Each line of a block comment starts with a # and a single space<br>
+    (unless it is indented text inside the comment).<br>
+<br>
+    Okay: x = x + 1  # Increment x<br>
+    Okay: x = x + 1    # Increment x<br>
+    Okay: # Block comment<br>
+    E261: x = x + 1 # Increment x<br>
+    E262: x = x + 1  #Increment x<br>
+    E262: x = x + 1  #  Increment x<br>
+    E265: #Block comment<br>
+    E266: ### Block comment<br>
+    """<br>
+    prev_end = (0, 0)<br>
+    for token_type, text, start, end, line in tokens:<br>
+        if token_type == tokenize.COMMENT:<br>
+            inline_comment = line[:start[1]].strip()<br>
+            if inline_comment:<br>
+                if prev_end[0] == start[0] and start[1] < prev_end[1] + 2:<br>
+                    yield (prev_end,<br>
+                           "E261 at least two spaces before inline comment")<br>
+            symbol, sp, comment = text.partition(' ')<br>
+            bad_prefix = symbol not in '#:' and (symbol.lstrip('#')[:1] or '#')<br>
+            if inline_comment:<br>
+                if bad_prefix or comment[:1] in WHITESPACE:<br>
+                    yield start, "E262 inline comment should start with '# '"<br>
+            elif bad_prefix and (bad_prefix != '!' or start[0] > 1):<br>
+                if bad_prefix != '#':<br>
+                    yield start, "E265 block comment should start with '# '"<br>
+                elif comment:<br>
+                    yield start, "E266 too many leading '#' for block comment"<br>
+        elif token_type != tokenize.NL:<br>
+            prev_end = end<br>
+<br>
+<br>
+def imports_on_separate_lines(logical_line):<br>
+    r"""Imports should usually be on separate lines.<br>
+<br>
+    Okay: import os\nimport sys<br>
+    E401: import sys, os<br>
+<br>
+    Okay: from subprocess import Popen, PIPE<br>
+    Okay: from myclas import MyClass<br>
+    Okay: from foo.bar.yourclass import YourClass<br>
+    Okay: import myclass<br>
+    Okay: import foo.bar.yourclass<br>
+    """<br>
+    line = logical_line<br>
+    if line.startswith('import '):<br>
+        found = line.find(',')<br>
+        if -1 < found and ';' not in line[:found]:<br>
+            yield found, "E401 multiple imports on one line"<br>
+<br>
+<br>
+def module_imports_on_top_of_file(<br>
+        logical_line, indent_level, checker_state, noqa):<br>
+    r"""Imports are always put at the top of the file, just after any module<br>
+    comments and docstrings, and before module globals and constants.<br>
+<br>
+    Okay: import os<br>
+    Okay: # this is a comment\nimport os<br>
+    Okay: '''this is a module docstring'''\nimport os<br>
+    Okay: r'''this is a module docstring'''\nimport os<br>
+    Okay: try:\n    import x\nexcept:\n    pass\nelse:\n    pass\nimport y<br>
+    Okay: try:\n    import x\nexcept:\n    pass\nfinally:\n    pass\nimport y<br>
+    E402: a=1\nimport os<br>
+    E402: 'One string'\n"Two string"\nimport os<br>
+    E402: a=1\nfrom sys import x<br>
+<br>
+    Okay: if x:\n    import os<br>
+    """<br>
+    def is_string_literal(line):<br>
+        if line[0] in 'uUbB':<br>
+            line = line[1:]<br>
+        if line and line[0] in 'rR':<br>
+            line = line[1:]<br>
+        return line and (line[0] == '"' or line[0] == "'")<br>
+<br>
+    allowed_try_keywords = ('try', 'except', 'else', 'finally')<br>
+<br>
+    if indent_level:  # Allow imports in conditional statements or functions<br>
+        return<br>
+    if not logical_line:  # Allow empty lines or comments<br>
+        return<br>
+    if noqa:<br>
+        return<br>
+    line = logical_line<br>
+    if line.startswith('import ') or line.startswith('from '):<br>
+        if checker_state.get('seen_non_imports', False):<br>
+            yield 0, "E402 module level import not at top of file"<br>
+    elif any(line.startswith(kw) for kw in allowed_try_keywords):<br>
+        # Allow try, except, else, finally keywords intermixed with imports in<br>
+        # order to support conditional importing<br>
+        return<br>
+    elif is_string_literal(line):<br>
+        # The first literal is a docstring, allow it. Otherwise, report error.<br>
+        if checker_state.get('seen_docstring', False):<br>
+            checker_state['seen_non_imports'] = True<br>
+        else:<br>
+            checker_state['seen_docstring'] = True<br>
+    else:<br>
+        checker_state['seen_non_imports'] = True<br>
+<br>
+<br>
+def compound_statements(logical_line):<br>
+    r"""Compound statements (on the same line) are generally discouraged.<br>
+<br>
+    While sometimes it's okay to put an if/for/while with a small body<br>
+    on the same line, never do this for multi-clause statements.<br>
+    Also avoid folding such long lines!<br>
+<br>
+    Always use a def statement instead of an assignment statement that<br>
+    binds a lambda expression directly to a name.<br>
+<br>
+    Okay: if foo == 'blah':\n    do_blah_thing()<br>
+    Okay: do_one()<br>
+    Okay: do_two()<br>
+    Okay: do_three()<br>
+<br>
+    E701: if foo == 'blah': do_blah_thing()<br>
+    E701: for x in lst: total += x<br>
+    E701: while t < 10: t = delay()<br>
+    E701: if foo == 'blah': do_blah_thing()<br>
+    E701: else: do_non_blah_thing()<br>
+    E701: try: something()<br>
+    E701: finally: cleanup()<br>
+    E701: if foo == 'blah': one(); two(); three()<br>
+    E702: do_one(); do_two(); do_three()<br>
+    E703: do_four();  # useless semicolon<br>
+    E704: def f(x): return 2*x<br>
+    E731: f = lambda x: 2*x<br>
+    """<br>
+    line = logical_line<br>
+    last_char = len(line) - 1<br>
+    found = line.find(':')<br>
+    while -1 < found < last_char:<br>
+        before = line[:found]<br>
+        if ((before.count('{') <= before.count('}') and   # {'a': 1} (dict)<br>
+             before.count('[') <= before.count(']') and   # [1:2] (slice)<br>
+             before.count('(') <= before.count(')'))):    # (annotation)<br>
+            lambda_kw = LAMBDA_REGEX.search(before)<br>
+            if lambda_kw:<br>
+                before = line[:lambda_kw.start()].rstrip()<br>
+                if before[-1:] == '=' and isidentifier(before[:-1].strip()):<br>
+                    yield 0, ("E731 do not assign a lambda expression, use a "<br>
+                              "def")<br>
+                break<br>
+            if before.startswith('def '):<br>
+                yield 0, "E704 multiple statements on one line (def)"<br>
+            else:<br>
+                yield found, "E701 multiple statements on one line (colon)"<br>
+        found = line.find(':', found + 1)<br>
+    found = line.find(';')<br>
+    while -1 < found:<br>
+        if found < last_char:<br>
+            yield found, "E702 multiple statements on one line (semicolon)"<br>
+        else:<br>
+            yield found, "E703 statement ends with a semicolon"<br>
+        found = line.find(';', found + 1)<br>
+<br>
+<br>
+def explicit_line_join(logical_line, tokens):<br>
+    r"""Avoid explicit line join between brackets.<br>
+<br>
+    The preferred way of wrapping long lines is by using Python's implied line<br>
+    continuation inside parentheses, brackets and braces.  Long lines can be<br>
+    broken over multiple lines by wrapping expressions in parentheses.  These<br>
+    should be used in preference to using a backslash for line continuation.<br>
+<br>
+    E502: aaa = [123, \\n       123]<br>
+    E502: aaa = ("bbb " \\n       "ccc")<br>
+<br>
+    Okay: aaa = [123,\n       123]<br>
+    Okay: aaa = ("bbb "\n       "ccc")<br>
+    Okay: aaa = "bbb " \\n    "ccc"<br>
+    Okay: aaa = 123  # \\<br>
+    """<br>
+    prev_start = prev_end = parens = 0<br>
+    comment = False<br>
+    backslash = None<br>
+    for token_type, text, start, end, line in tokens:<br>
+        if token_type == tokenize.COMMENT:<br>
+            comment = True<br>
+        if start[0] != prev_start and parens and backslash and not comment:<br>
+            yield backslash, "E502 the backslash is redundant between brackets"<br>
+        if end[0] != prev_end:<br>
+            if line.rstrip('\r\n').endswith('\\'):<br>
+                backslash = (end[0], len(line.splitlines()[-1]) - 1)<br>
+            else:<br>
+                backslash = None<br>
+            prev_start = prev_end = end[0]<br>
+        else:<br>
+            prev_start = start[0]<br>
+        if token_type == tokenize.OP:<br>
+            if text in '([{':<br>
+                parens += 1<br>
+            elif text in ')]}':<br>
+                parens -= 1<br>
+<br>
+<br>
+def break_around_binary_operator(logical_line, tokens):<br>
+    r"""<br>
+    Avoid breaks before binary operators.<br>
+<br>
+    The preferred place to break around a binary operator is after the<br>
+    operator, not before it.<br>
+<br>
+    W503: (width == 0\n + height == 0)<br>
+    W503: (width == 0\n and height == 0)<br>
+<br>
+    Okay: (width == 0 +\n height == 0)<br>
+    Okay: foo(\n    -x)<br>
+    Okay: foo(x\n    [])<br>
+    Okay: x = '''\n''' + ''<br>
+    Okay: foo(x,\n    -y)<br>
+    Okay: foo(x,  # comment\n    -y)<br>
+    """<br>
+    def is_binary_operator(token_type, text):<br>
+        # The % character is strictly speaking a binary operator, but the<br>
+        # common usage seems to be to put it next to the format parameters,<br>
+        # after a line break.<br>
+        return ((token_type == tokenize.OP or text in ['and', 'or']) and<br>
+                text not in "()[]{},:.;@=%")<br>
+<br>
+    line_break = False<br>
+    unary_context = True<br>
+    for token_type, text, start, end, line in tokens:<br>
+        if token_type == tokenize.COMMENT:<br>
+            continue<br>
+        if ('\n' in text or '\r' in text) and token_type != tokenize.STRING:<br>
+            line_break = True<br>
+        else:<br>
+            if (is_binary_operator(token_type, text) and line_break and<br>
+                    not unary_context):<br>
+                yield start, "W503 line break before binary operator"<br>
+            unary_context = text in '([{,;'<br>
+            line_break = False<br>
+<br>
+<br>
+def comparison_to_singleton(logical_line, noqa):<br>
+    r"""Comparison to singletons should use "is" or "is not".<br>
+<br>
+    Comparisons to singletons like None should always be done<br>
+    with "is" or "is not", never the equality operators.<br>
+<br>
+    Okay: if arg is not None:<br>
+    E711: if arg != None:<br>
+    E711: if None == arg:<br>
+    E712: if arg == True:<br>
+    E712: if False == arg:<br>
+<br>
+    Also, beware of writing if x when you really mean if x is not None --<br>
+    e.g. when testing whether a variable or argument that defaults to None was<br>
+    set to some other value.  The other value might have a type (such as a<br>
+    container) that could be false in a boolean context!<br>
+    """<br>
+    match = not noqa and COMPARE_SINGLETON_REGEX.search(logical_line)<br>
+    if match:<br>
+        singleton = match.group(1) or match.group(3)<br>
+        same = (match.group(2) == '==')<br>
+<br>
+        msg = "'if cond is %s:'" % (('' if same else 'not ') + singleton)<br>
+        if singleton in ('None',):<br>
+            code = 'E711'<br>
+        else:<br>
+            code = 'E712'<br>
+            nonzero = ((singleton == 'True' and same) or<br>
+                       (singleton == 'False' and not same))<br>
+            msg += " or 'if %scond:'" % ('' if nonzero else 'not ')<br>
+        yield match.start(2), ("%s comparison to %s should be %s" %<br>
+                               (code, singleton, msg))<br>
+<br>
+<br>
+def comparison_negative(logical_line):<br>
+    r"""Negative comparison should be done using "not in" and "is not".<br>
+<br>
+    Okay: if x not in y:\n    pass<br>
+    Okay: assert (X in Y or X is Z)<br>
+    Okay: if not (X in Y):\n    pass<br>
+    Okay: zz = x is not y<br>
+    E713: Z = not X in Y<br>
+    E713: if not X.B in Y:\n    pass<br>
+    E714: if not X is Y:\n    pass<br>
+    E714: Z = not X.B is Y<br>
+    """<br>
+    match = COMPARE_NEGATIVE_REGEX.search(logical_line)<br>
+    if match:<br>
+        pos = match.start(1)<br>
+        if match.group(2) == 'in':<br>
+            yield pos, "E713 test for membership should be 'not in'"<br>
+        else:<br>
+            yield pos, "E714 test for object identity should be 'is not'"<br>
+<br>
+<br>
+def comparison_type(logical_line, noqa):<br>
+    r"""Object type comparisons should always use isinstance().<br>
+<br>
+    Do not compare types directly.<br>
+<br>
+    Okay: if isinstance(obj, int):<br>
+    E721: if type(obj) is type(1):<br>
+<br>
+    When checking if an object is a string, keep in mind that it might be a<br>
+    unicode string too! In Python 2.3, str and unicode have a common base<br>
+    class, basestring, so you can do:<br>
+<br>
+    Okay: if isinstance(obj, basestring):<br>
+    Okay: if type(a1) is type(b1):<br>
+    """<br>
+    match = COMPARE_TYPE_REGEX.search(logical_line)<br>
+    if match and not noqa:<br>
+        inst = match.group(1)<br>
+        if inst and isidentifier(inst) and inst not in SINGLETONS:<br>
+            return  # Allow comparison for types which are not obvious<br>
+        yield match.start(), "E721 do not compare types, use 'isinstance()'"<br>
+<br>
+<br>
+def python_3000_has_key(logical_line, noqa):<br>
+    r"""The {}.has_key() method is removed in Python 3: use the 'in' operator.<br>
+<br>
+    Okay: if "alph" in d:\n    print d["alph"]<br>
+    W601: assert d.has_key('alph')<br>
+    """<br>
+    pos = logical_line.find('.has_key(')<br>
+    if pos > -1 and not noqa:<br>
+        yield pos, "W601 .has_key() is deprecated, use 'in'"<br>
+<br>
+<br>
+def python_3000_raise_comma(logical_line):<br>
+    r"""When raising an exception, use "raise ValueError('message')".<br>
+<br>
+    The older form is removed in Python 3.<br>
+<br>
+    Okay: raise DummyError("Message")<br>
+    W602: raise DummyError, "Message"<br>
+    """<br>
+    match = RAISE_COMMA_REGEX.match(logical_line)<br>
+    if match and not RERAISE_COMMA_REGEX.match(logical_line):<br>
+        yield match.end() - 1, "W602 deprecated form of raising exception"<br>
+<br>
+<br>
+def python_3000_not_equal(logical_line):<br>
+    r"""New code should always use != instead of <>.<br>
+<br>
+    The older syntax is removed in Python 3.<br>
+<br>
+    Okay: if a != 'no':<br>
+    W603: if a <> 'no':<br>
+    """<br>
+    pos = logical_line.find('<>')<br>
+    if pos > -1:<br>
+        yield pos, "W603 '<>' is deprecated, use '!='"<br>
+<br>
+<br>
+def python_3000_backticks(logical_line):<br>
+    r"""Backticks are removed in Python 3: use repr() instead.<br>
+<br>
+    Okay: val = repr(1 + 2)<br>
+    W604: val = `1 + 2`<br>
+    """<br>
+    pos = logical_line.find('`')<br>
+    if pos > -1:<br>
+        yield pos, "W604 backticks are deprecated, use 'repr()'"<br>
+<br>
+<br>
+##############################################################################<br>
+# Helper functions<br>
+##############################################################################<br>
+<br>
+<br>
+if sys.version_info < (3,):<br>
+    # Python 2: implicit encoding.<br>
+    def readlines(filename):<br>
+        """Read the source code."""<br>
+        with open(filename, 'rU') as f:<br>
+            return f.readlines()<br>
+    isidentifier = re.compile(r'[a-zA-Z_]\w*$').match<br>
+    stdin_get_value = sys.stdin.read<br>
+else:<br>
+    # Python 3<br>
+    def readlines(filename):<br>
+        """Read the source code."""<br>
+        try:<br>
+            with open(filename, 'rb') as f:<br>
+                (coding, lines) = tokenize.detect_encoding(f.readline)<br>
+                f = TextIOWrapper(f, coding, line_buffering=True)<br>
+                return [l.decode(coding) for l in lines] + f.readlines()<br>
+        except (LookupError, SyntaxError, UnicodeError):<br>
+            # Fall back if file encoding is improperly declared<br>
+            with open(filename, encoding='latin-1') as f:<br>
+                return f.readlines()<br>
+    isidentifier = str.isidentifier<br>
+<br>
+    def stdin_get_value():<br>
+        return TextIOWrapper(sys.stdin.buffer, errors='ignore').read()<br>
+noqa = re.compile(r'# no(?:qa|pep8)\b', re.I).search<br>
+<br>
+<br>
+def expand_indent(line):<br>
+    r"""Return the amount of indentation.<br>
+<br>
+    Tabs are expanded to the next multiple of 8.<br>
+<br>
+    >>> expand_indent('    ')<br>
+    4<br>
+    >>> expand_indent('\t')<br>
+    8<br>
+    >>> expand_indent('       \t')<br>
+    8<br>
+    >>> expand_indent('        \t')<br>
+    16<br>
+    """<br>
+    if '\t' not in line:<br>
+        return len(line) - len(line.lstrip())<br>
+    result = 0<br>
+    for char in line:<br>
+        if char == '\t':<br>
+            result = result // 8 * 8 + 8<br>
+        elif char == ' ':<br>
+            result += 1<br>
+        else:<br>
+            break<br>
+    return result<br>
+<br>
+<br>
+def mute_string(text):<br>
+    """Replace contents with 'xxx' to prevent syntax matching.<br>
+<br>
+    >>> mute_string('"abc"')<br>
+    '"xxx"'<br>
+    >>> mute_string("'''abc'''")<br>
+    "'''xxx'''"<br>
+    >>> mute_string("r'abc'")<br>
+    "r'xxx'"<br>
+    """<br>
+    # String modifiers (e.g. u or r)<br>
+    start = text.index(text[-1]) + 1<br>
+    end = len(text) - 1<br>
+    # Triple quotes<br>
+    if text[-3:] in ('"""', "'''"):<br>
+        start += 2<br>
+        end -= 2<br>
+    return text[:start] + 'x' * (end - start) + text[end:]<br>
+<br>
+<br>
+def parse_udiff(diff, patterns=None, parent='.'):<br>
+    """Return a dictionary of matching lines."""<br>
+    # For each file of the diff, the entry key is the filename,<br>
+    # and the value is a set of row numbers to consider.<br>
+    rv = {}<br>
+    path = nrows = None<br>
+    for line in diff.splitlines():<br>
+        if nrows:<br>
+            if line[:1] != '-':<br>
+                nrows -= 1<br>
+            continue<br>
+        if line[:3] == '@@ ':<br>
+            hunk_match = HUNK_REGEX.match(line)<br>
+            (row, nrows) = [int(g or '1') for g in hunk_match.groups()]<br>
+            rv[path].update(range(row, row + nrows))<br>
+        elif line[:3] == '+++':<br>
+            path = line[4:].split('\t', 1)[0]<br>
+            if path[:2] == 'b/':<br>
+                path = path[2:]<br>
+            rv[path] = set()<br>
+    return dict([(os.path.join(parent, path), rows)<br>
+                 for (path, rows) in rv.items()<br>
+                 if rows and filename_match(path, patterns)])<br>
+<br>
+<br>
+def normalize_paths(value, parent=os.curdir):<br>
+    """Parse a comma-separated list of paths.<br>
+<br>
+    Return a list of absolute paths.<br>
+    """<br>
+    if not value:<br>
+        return []<br>
+    if isinstance(value, list):<br>
+        return value<br>
+    paths = []<br>
+    for path in value.split(','):<br>
+        path = path.strip()<br>
+        if '/' in path:<br>
+            path = os.path.abspath(os.path.join(parent, path))<br>
+        paths.append(path.rstrip('/'))<br>
+    return paths<br>
+<br>
+<br>
+def filename_match(filename, patterns, default=True):<br>
+    """Check if patterns contains a pattern that matches filename.<br>
+<br>
+    If patterns is unspecified, this always returns True.<br>
+    """<br>
+    if not patterns:<br>
+        return default<br>
+    return any(fnmatch(filename, pattern) for pattern in patterns)<br>
+<br>
+<br>
+def _is_eol_token(token):<br>
+    return token[0] in NEWLINE or token[4][token[3][1]:].lstrip() == '\\\n'<br>
+if COMMENT_WITH_NL:<br>
+    def _is_eol_token(token, _eol_token=_is_eol_token):<br>
+        return _eol_token(token) or (token[0] == tokenize.COMMENT and<br>
+                                     token[1] == token[4])<br>
+<br>
+##############################################################################<br>
+# Framework to run all checks<br>
+##############################################################################<br>
+<br>
+<br>
+_checks = {'physical_line': {}, 'logical_line': {}, 'tree': {}}<br>
+<br>
+<br>
+def _get_parameters(function):<br>
+    if sys.version_info >= (3, 3):<br>
+        return [<a href="http://parameter.name" rel="noreferrer" target="_blank">parameter.name</a><br>
+                for parameter<br>
+                in inspect.signature(function).parameters.values()<br>
+                if parameter.kind == parameter.POSITIONAL_OR_KEYWORD]<br>
+    else:<br>
+        return inspect.getargspec(function)[0]<br>
+<br>
+<br>
+def register_check(check, codes=None):<br>
+    """Register a new check object."""<br>
+    def _add_check(check, kind, codes, args):<br>
+        if check in _checks[kind]:<br>
+            _checks[kind][check][0].extend(codes or [])<br>
+        else:<br>
+            _checks[kind][check] = (codes or [''], args)<br>
+    if inspect.isfunction(check):<br>
+        args = _get_parameters(check)<br>
+        if args and args[0] in ('physical_line', 'logical_line'):<br>
+            if codes is None:<br>
+                codes = ERRORCODE_REGEX.findall(check.__doc__ or '')<br>
+            _add_check(check, args[0], codes, args)<br>
+    elif inspect.isclass(check):<br>
+        if _get_parameters(check.__init__)[:2] == ['self', 'tree']:<br>
+            _add_check(check, 'tree', codes, None)<br>
+<br>
+<br>
+def init_checks_registry():<br>
+    """Register all globally visible functions.<br>
+<br>
+    The first argument name is either 'physical_line' or 'logical_line'.<br>
+    """<br>
+    mod = inspect.getmodule(register_check)<br>
+    for (name, function) in inspect.getmembers(mod, inspect.isfunction):<br>
+        register_check(function)<br>
+init_checks_registry()<br>
+<br>
+<br>
+class Checker(object):<br>
+    """Load a Python source file, tokenize it, check coding style."""<br>
+<br>
+    def __init__(self, filename=None, lines=None,<br>
+                 options=None, report=None, **kwargs):<br>
+        if options is None:<br>
+            options = StyleGuide(kwargs).options<br>
+        else:<br>
+            assert not kwargs<br>
+        self._io_error = None<br>
+        self._physical_checks = options.physical_checks<br>
+        self._logical_checks = options.logical_checks<br>
+        self._ast_checks = options.ast_checks<br>
+        self.max_line_length = options.max_line_length<br>
+        self.multiline = False  # in a multiline string?<br>
+        self.hang_closing = options.hang_closing<br>
+        self.verbose = options.verbose<br>
+        self.filename = filename<br>
+        # Dictionary where a checker can store its custom state.<br>
+        self._checker_states = {}<br>
+        if filename is None:<br>
+            self.filename = 'stdin'<br>
+            self.lines = lines or []<br>
+        elif filename == '-':<br>
+            self.filename = 'stdin'<br>
+            self.lines = stdin_get_value().splitlines(True)<br>
+        elif lines is None:<br>
+            try:<br>
+                self.lines = readlines(filename)<br>
+            except IOError:<br>
+                (exc_type, exc) = sys.exc_info()[:2]<br>
+                self._io_error = '%s: %s' % (exc_type.__name__, exc)<br>
+                self.lines = []<br>
+        else:<br>
+            self.lines = lines<br>
+        if self.lines:<br>
+            ord0 = ord(self.lines[0][0])<br>
+            if ord0 in (0xef, 0xfeff):  # Strip the UTF-8 BOM<br>
+                if ord0 == 0xfeff:<br>
+                    self.lines[0] = self.lines[0][1:]<br>
+                elif self.lines[0][:3] == '\xef\xbb\xbf':<br>
+                    self.lines[0] = self.lines[0][3:]<br>
+        self.report = report or options.report<br>
+        self.report_error = self.report.error<br>
+<br>
+    def report_invalid_syntax(self):<br>
+        """Check if the syntax is valid."""<br>
+        (exc_type, exc) = sys.exc_info()[:2]<br>
+        if len(exc.args) > 1:<br>
+            offset = exc.args[1]<br>
+            if len(offset) > 2:<br>
+                offset = offset[1:3]<br>
+        else:<br>
+            offset = (1, 0)<br>
+        self.report_error(offset[0], offset[1] or 0,<br>
+                          'E901 %s: %s' % (exc_type.__name__, exc.args[0]),<br>
+                          self.report_invalid_syntax)<br>
+<br>
+    def readline(self):<br>
+        """Get the next line from the input buffer."""<br>
+        if self.line_number >= self.total_lines:<br>
+            return ''<br>
+        line = self.lines[self.line_number]<br>
+        self.line_number += 1<br>
+        if self.indent_char is None and line[:1] in WHITESPACE:<br>
+            self.indent_char = line[0]<br>
+        return line<br>
+<br>
+    def run_check(self, check, argument_names):<br>
+        """Run a check plugin."""<br>
+        arguments = []<br>
+        for name in argument_names:<br>
+            arguments.append(getattr(self, name))<br>
+        return check(*arguments)<br>
+<br>
+    def init_checker_state(self, name, argument_names):<br>
+        """ Prepares a custom state for the specific checker plugin."""<br>
+        if 'checker_state' in argument_names:<br>
+            self.checker_state = self._checker_states.setdefault(name, {})<br>
+<br>
+    def check_physical(self, line):<br>
+        """Run all physical checks on a raw input line."""<br>
+        self.physical_line = line<br>
+        for name, check, argument_names in self._physical_checks:<br>
+            self.init_checker_state(name, argument_names)<br>
+            result = self.run_check(check, argument_names)<br>
+            if result is not None:<br>
+                (offset, text) = result<br>
+                self.report_error(self.line_number, offset, text, check)<br>
+                if text[:4] == 'E101':<br>
+                    self.indent_char = line[0]<br>
+<br>
+    def build_tokens_line(self):<br>
+        """Build a logical line from tokens."""<br>
+        logical = []<br>
+        comments = []<br>
+        length = 0<br>
+        prev_row = prev_col = mapping = None<br>
+        for token_type, text, start, end, line in self.tokens:<br>
+            if token_type in SKIP_TOKENS:<br>
+                continue<br>
+            if not mapping:<br>
+                mapping = [(0, start)]<br>
+            if token_type == tokenize.COMMENT:<br>
+                comments.append(text)<br>
+                continue<br>
+            if token_type == tokenize.STRING:<br>
+                text = mute_string(text)<br>
+            if prev_row:<br>
+                (start_row, start_col) = start<br>
+                if prev_row != start_row:    # different row<br>
+                    prev_text = self.lines[prev_row - 1][prev_col - 1]<br>
+                    if prev_text == ',' or (prev_text not in '{[(' and<br>
+                                            text not in '}])'):<br>
+                        text = ' ' + text<br>
+                elif prev_col != start_col:  # different column<br>
+                    text = line[prev_col:start_col] + text<br>
+            logical.append(text)<br>
+            length += len(text)<br>
+            mapping.append((length, end))<br>
+            (prev_row, prev_col) = end<br>
+        self.logical_line = ''.join(logical)<br>
+        self.noqa = comments and noqa(''.join(comments))<br>
+        return mapping<br>
+<br>
+    def check_logical(self):<br>
+        """Build a line from tokens and run all logical checks on it."""<br>
+        self.report.increment_logical_line()<br>
+        mapping = self.build_tokens_line()<br>
+<br>
+        if not mapping:<br>
+            return<br>
+<br>
+        (start_row, start_col) = mapping[0][1]<br>
+        start_line = self.lines[start_row - 1]<br>
+        self.indent_level = expand_indent(start_line[:start_col])<br>
+        if self.blank_before < self.blank_lines:<br>
+            self.blank_before = self.blank_lines<br>
+        if self.verbose >= 2:<br>
+            print(self.logical_line[:80].rstrip())<br>
+        for name, check, argument_names in self._logical_checks:<br>
+            if self.verbose >= 4:<br>
+                print('   ' + name)<br>
+            self.init_checker_state(name, argument_names)<br>
+            for offset, text in self.run_check(check, argument_names) or ():<br>
+                if not isinstance(offset, tuple):<br>
+                    for token_offset, pos in mapping:<br>
+                        if offset <= token_offset:<br>
+                            break<br>
+                    offset = (pos[0], pos[1] + offset - token_offset)<br>
+                self.report_error(offset[0], offset[1], text, check)<br>
+        if self.logical_line:<br>
+            self.previous_indent_level = self.indent_level<br>
+            self.previous_logical = self.logical_line<br>
+        self.blank_lines = 0<br>
+        self.tokens = []<br>
+<br>
+    def check_ast(self):<br>
+        """Build the file's AST and run all AST checks."""<br>
+        try:<br>
+            tree = compile(''.join(self.lines), '', 'exec', PyCF_ONLY_AST)<br>
+        except (ValueError, SyntaxError, TypeError):<br>
+            return self.report_invalid_syntax()<br>
+        for name, cls, __ in self._a</blockquote></div>