Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Documentation of errors/warnings #85

OddBloke opened this Issue · 3 comments

2 participants


We've just had a conversation about which PEP-8 errors/warnings we are happy to ignore. Without the codebase in question in front of me (and pep8 installed), it's very difficult to know what people are talking about, as there is no documentation of what the errors and warnings are.


I'll think of adding this.

As a workaround, this command gives some hints (except E901 which is for SyntaxErrors):

python --first --select E,W testsuite/ --format '%(code)s: %(text)s'

E101: indentation contains mixed spaces and tabs
E111: indentation is not a multiple of four
E112: expected an indented block
E113: unexpected indentation
E121: continuation line indentation is not a multiple of four
E122: continuation line missing indentation or outdented
E123: closing bracket does not match indentation of opening bracket's line
E124: closing bracket does not match visual indentation
E125: continuation line does not distinguish itself from next logical line
E126: continuation line over-indented for hanging indent
E127: continuation line over-indented for visual indent
E128: continuation line under-indented for visual indent
E201: whitespace after '('
E202: whitespace before ')'
E203: whitespace before ':'
E211: whitespace before '('
E221: multiple spaces before operator
E222: multiple spaces after operator
E223: tab before operator
E224: tab after operator
E225: missing whitespace around operator
E231: missing whitespace after ','
E241: multiple spaces after ','
E242: tab after ','
E251: no spaces around keyword / parameter equals
E261: at least two spaces before inline comment
E262: inline comment should start with '# '
E271: multiple spaces after keyword
E272: multiple spaces before keyword
E273: tab after keyword
E274: tab before keyword
E301: expected 1 blank line, found 0
E302: expected 2 blank lines, found 0
E303: too many blank lines (3)
E304: blank lines found after function decorator
E401: multiple imports on one line
E501: line too long (82 characters)
E502: the backslash is redundant between brackets
E701: multiple statements on one line (colon)
E702: multiple statements on one line (semicolon)
E711: comparison to None should be 'if cond is None:'
E712: comparison to True should be 'if cond is True:' or 'if cond:'
E721: do not compare types, use 'isinstance()'
E901: IndentationError: unindent does not match any outer indentation level
W191: indentation contains tabs
W291: trailing whitespace
W292: no newline at end of file
W293: blank line contains whitespace
W391: blank line at end of file
W601: .has_key() is deprecated, use 'in'
W602: deprecated form of raising exception
W603: '<>' is deprecated, use '!='
W604: backticks are deprecated, use 'repr()'

That looks good; just having that readily available (and up-to-date) somewhere online would be handy. Thanks!


Now in the wiki.

@florentx florentx closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.