AnthonyDiGirolamo / todotxt-machine

an interactive terminal based todo.txt file editor with an interface similar to mutt
https://pypi.python.org/pypi/todotxt-machine/
GNU General Public License v3.0
244 stars 37 forks source link

pep8 #35

Open nicwest opened 8 years ago

nicwest commented 8 years ago

There are some pep8 issues with this code atm:

9       E111 indentation is not a multiple of four
1       E121 continuation line under-indented for hanging indent
73      E122 continuation line missing indentation or outdented
12      E128 continuation line under-indented for visual indent
1       E129 visually indented line with same indent as next logical line
58      E201 whitespace after '('
119     E202 whitespace before ')'
1       E203 whitespace before ','
134     E221 multiple spaces before operator
2       E225 missing whitespace around operator
5       E231 missing whitespace after ','
12      E251 unexpected spaces around keyword / parameter equals
6       E261 at least two spaces before inline comment
1       E265 block comment should start with '# '
51      E302 expected 2 blank lines, found 1
2       E303 too many blank lines (2)
281     E501 line too long (84 > 79 characters)
1       E703 statement ends with a semicolon
2       E712 comparison to False should be 'if cond is False:' or 'if not cond:'
1       W391 blank line at end of file

Personally I don't massively care about E501 (within reason) and I would just ignore it, the rest decrease readability and in places could introduce bugs.

There are a also handful of non stylistic issues:

4       F401 'sleep' imported but unused
1       F402 import 'todo' from line 5 shadowed by loop variable
2       F841 local variable 'default' is assigned to but never used

I like flake8 for static analysis personally (combines pep8, pyflakes, and mccabe)