mypaint / libmypaint

libmypaint, a.k.a. "brushlib", is a library for making brushstrokes which is used by MyPaint and other projects.
http://mypaint.org
Other
308 stars 87 forks source link

PEP-8 compliance #11

Closed iirelu closed 10 years ago

iirelu commented 10 years ago

Running pep8 --statistics on libmypaint:

2       E121 continuation line under-indented for hanging indent
6       E122 continuation line missing indentation or outdented
6       E203 whitespace before ':'
1       E222 multiple spaces after operator
5       E225 missing whitespace around operator
3       E261 at least two spaces before inline comment
48      E265 block comment should start with '# '
13      E302 expected 2 blank lines, found 1
1       E303 too many blank lines (3)
3       E401 multiple imports on one line
35      E501 line too long (124 > 79 characters)
1       E701 multiple statements on one line (colon)
4       E703 statement ends with a semicolon
1       W291 trailing whitespace
2       W391 blank line at end of file

I'm making this a separate issue for libmypaint as opposed to mypaint/mypaint#110. I'll fix uncontroversial things first, and then wait for feedback on more style-related things.

iirelu commented 10 years ago

12 fixes a bunch.

There's now just 23 too-long lines, but I know line length is a controversial topic so I didn't change them.

martinxyz commented 10 years ago

Sorry for the delay, it looks like I'm not really up to maintainence here. I don't like patches collecting dust. I've tried to add you to the MyPaint team. Feel free to push to libmypaint directly. Coordinate with @achadwick concerning the main MyPaint (GUI) repository - he may prefer to have a review via issues before you push there.

iirelu commented 10 years ago

As of this commit the output of flake8 (has more functionality than previously-used pep8) now looks like this:

48      E265 block comment should start with '# '
35      E501 line too long (86 > 79 characters)
1       F403 'from pylab import *' used; unable to detect undefined names
1       F812 list comprehension redefines 's' from line 92

I'll close this issue as these are small enough to just be fixed later.