View Single Post
Old 10-15-2014, 10:57 PM   #1058
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Out of curiosity I've tried to run flake8 on KindleUnpack codebase:
Spoiler:
Code:
$ flake8 -qq -statistics KindleUnpack
1st column: number of similar PEP8 errors (EXXX)/PEP8 warnings (WXXX)/failed pyflakes source checks (FXXX)
2nd column: error code
3rd column: error description

Description of FXXX could contain variable/module/something name in single quotes '...', but it's only a name from the first failed check with this code (other similarly failed checks could be related to other name(s) which is (are) just "masked").
Code:
1       E101 indentation contains mixed spaces and tabs
2       E111 indentation is not a multiple of four
1       E122 continuation line missing indentation or outdented
1       E124 closing bracket does not match visual indentation
24      E126 continuation line over-indented for hanging indent
5       E127 continuation line over-indented for visual indent
12      E128 continuation line under-indented for visual indent
12      E131 continuation line unaligned for hanging indent
2       E202 whitespace before ')'
953     E203 whitespace before ':'
1       E211 whitespace before '('
8       E221 multiple spaces before operator
12      E222 multiple spaces after operator
63      E225 missing whitespace around operator
16      E227 missing whitespace around bitwise or shift operator
7       E228 missing whitespace around modulo operator
468     E231 missing whitespace after ','
10      E251 unexpected spaces around keyword / parameter equals
103     E261 at least two spaces before inline comment
4       E262 inline comment should start with '# '
46      E265 block comment should start with '# '
6       E271 multiple spaces after keyword
3       E272 multiple spaces before keyword
4       E301 expected 1 blank line, found 0
56      E302 expected 2 blank lines, found 1
69      E303 too many blank lines (3)
25      E401 multiple imports on one line
614     E501 line too long (84 > 79 characters)
4       E502 the backslash is redundant between brackets
21      E701 multiple statements on one line (colon)
2       E703 statement ends with a semicolon
1       E711 comparison to None should be 'if cond is not None:'
77      F401 'cdll' imported but unused
3       F811 redefinition of unused 'uuid' from line 154
1       F821 undefined name 'value'
11      F841 local variable 'boundary' is assigned to but never used
1       W191 indentation contains tabs
35      W291 trailing whitespace
1       W292 no newline at end of file
19      W293 blank line contains whitespace
8       W391 blank line at end of file

I did this not for blaming purposes. I understand that KindleUnpack is working code useful for many people in current state, so it's a practically good code. But this list possibly contains some low-hanging fruits.
eureka is offline   Reply With Quote