[Buildbot-devel] Using pep8 on Buildbot source code

Vladimir Rutsky rutsky.vladimir at gmail.com
Sun Oct 20 00:09:44 UTC 2013


Hello!

Recently Dustin merged changes that adds pep8 
(http://pep8.readthedocs.org/en/latest/intro.html) run on Buildbot 
source code on Travis and I hope it soon will be run on 
http://buildbot.buildbot.net (bugs http://trac.buildbot.net/ticket/2572, 
http://trac.buildbot.net/ticket/2573).

I want to raise discussion which reported by pep8 issues are important 
for Buildbot source code and which not.

Here is list of issues emerged on Buildbot source code (first number is 
number of occurrences):

145     E101 indentation contains mixed spaces and tabs
538     E111 indentation is not a multiple of four
272     E121 continuation line indentation is not a multiple of four
59      E122 continuation line missing indentation or outdented
87      E124 closing bracket does not match visual indentation
35      E125 continuation line does not distinguish itself from next 
logical line
1314    E126 continuation line over-indented for hanging indent
522     E127 continuation line over-indented for visual indent
3487    E128 continuation line under-indented for visual indent
1010    E201 whitespace after '['
933     E202 whitespace before ']'
891     E203 whitespace before ':'
13      E211 whitespace before '('
36      E221 multiple spaces before operator
12      E222 multiple spaces after operator
182     E225 missing whitespace around operator
10      E227 missing whitespace around bitwise or shift operator
30      E228 missing whitespace around modulo operator
820     E231 missing whitespace after ','
932     E251 unexpected spaces around keyword / parameter equals
586     E261 at least two spaces before inline comment
17      E262 inline comment should start with '# '
10      E271 multiple spaces after keyword
12      E272 multiple spaces before keyword
1138    E301 expected 1 blank line, found 0
1045    E302 expected 2 blank lines, found 1
247     E303 too many blank lines (2)
39      E401 multiple imports on one line
2545    E501 line too long (80 > 79 characters)
35      E502 the backslash is redundant between brackets
78      E701 multiple statements on one line (colon)
8       E703 statement ends with a semicolon
79      E711 comparison to None should be 'if cond is None:'
23      E712 comparison to False should be 'if cond is False:' or 'if 
not cond:'
15      E721 do not compare types, use 'isinstance()'
117     W191 indentation contains tabs
316     W291 trailing whitespace
3       W292 no newline at end of file
421     W293 blank line contains whitespace
95      W391 blank line at end of file
47      W601 .has_key() is deprecated, use 'in'
16      W602 deprecated form of raising exception
11      W604 backticks are deprecated, use 'repr()'

First two (E101 "indentation contains mixed spaces and tabs" and E111 
"indentation is not a multiple of four") already fixed and all other 
issues currently ignored.

Which issues are important and which should be ignored?

--
Vladimir Rutsky





More information about the devel mailing list