We should run pychecker on the python code i ThinLinc.
There are several problems associated with running pychecker om the current ThinLinc codebase. See 185113 in komintern with discussion. I've created a program that creates a symlink farm to run pychecker on, so programs with filenames not ending with .py can be checked. I've fixed some serious errors, but to decrease the number of errors reported by pychecker significantly, more code modification than I want to do right before a release is required. Code must be moved into modules, a lot of programs should init their global variables differently, we should check __name__ to see if it is '__main__' etc. I'll retarget this bug for 1.4.1, so we can do more about the problems during development of that release.
Bah! Forgot to retarget.
FWIW: Here's what pycodestyle-2.0.0 reports for Python files in ctc/ (r32311): > $ pycodestyle --statistics -qq <python-files> > Num Error > 3762 E501 line too long (x > 79 characters) > 3250 E231 missing whitespace after ',' > 1888 W293 blank line contains whitespace > 1573 E302 expected 2 blank lines, found 1 > 1524 W191 indentation contains tabs > 1430 W291 trailing whitespace > 1244 E251 unexpected spaces around keyword / parameter equals > 1137 E225 missing whitespace around operator > 841 E101 indentation contains mixed spaces and tabs > 781 E303 too many blank lines (2) > 561 E202 whitespace before ']' > 560 E201 whitespace after '[' > 527 E402 module level import not at top of file > 518 E203 whitespace before ':' > 447 E261 at least two spaces before inline comment > 386 E128 continuation line under-indented for visual indent > 359 W601 .has_key() is deprecated, use 'in' > 329 E111 indentation is not a multiple of four > 305 E703 statement ends with a semicolon > 299 E701 multiple statements on one line (colon) > 276 E265 block comment should start with '# ' > 241 E266 too many leading '#' for block comment > 221 E221 multiple spaces before operator > 215 E502 the backslash is redundant between brackets > 203 E301 expected 1 blank line, found 0 > 173 E711 comparison to None should be 'if cond is not None:' > 165 E127 continuation line over-indented for visual indent > 128 E122 continuation line missing indentation or outdented > 127 W391 blank line at end of file > 121 E228 missing whitespace around modulo operator > 88 E211 whitespace before '(' > 71 W602 deprecated form of raising exception > 68 E401 multiple imports on one line > 61 E222 multiple spaces after operator > 52 E702 multiple statements on one line (semicolon) > 50 E712 comparison to False should be 'if cond is False:' or 'if not cond:' > 47 E731 do not assign a lambda expression, use a def > 46 E227 missing whitespace around bitwise or shift operator > 46 E113 unexpected indentation > 43 E721 do not compare types, use 'isinstance()' > 36 E272 multiple spaces before keyword > 35 W604 backticks are deprecated, use 'repr()' > 31 E262 inline comment should start with '# ' > 30 W603 '<>' is deprecated, use '!=' > 24 E131 continuation line unaligned for hanging indent > 23 E713 test for membership should be 'not in' > 22 E271 multiple spaces after keyword > 22 E112 expected an indented block > 20 E125 continuation line with same indent as next logical line > 18 E124 closing bracket does not match visual indentation > 16 E115 expected an indented block (comment) > 12 E114 indentation is not a multiple of four (comment) > 7 E116 unexpected indentation (comment) > 6 E901 TokenError: EOF in multi-line statement > 6 E129 visually indented line with same indent as next logical line > 1 W292 no newline at end of file > 1 E714 test for object identity should be 'is not' > 1 E304 blank lines found after function decorator > 1 E224 tab after operator
Unused imports: http://git.cendio.se/cgit/~derfian/thinlinc.git/log/?h=flake8-unused-imports Found by running flake8 on our source tree
The world has moved on from pychecker, so this specific tool is not relevant for our current Python code.