
Can't seem to get this to run; gives me some warnings on Windows (and then runs) and does not run on Ubunutu. Reverting the virtualenv work-around got it running again; so something must be amiss with my version.
FWIW, here is a dump of my versions:
On Windows:
$ pep8 --version 1.4.6
On Ubunutu:
$ pep8 --version 1.6.2
Also, as of today I counted 5673 errors reported by pep8. Below is a dump of the stats just to be clear on the actual error codes. May I offer a suggestion that we ease into these checks? Possibly, by begining to filter the most offensive errors at first and as we clear those up introduce more strict requirements? ie: maybe omit all whitespace errors to begin with...
106 E101 indentation contains mixed spaces and tabs 256 E111 indentation is not a multiple of four 460 E121 continuation line indentation is not a multiple of four 25 E122 continuation line missing indentation or outdented 6 E124 closing bracket does not match visual indentation 8 E125 continuation line does not distinguish itself from next logical lin e 71 E126 continuation line over-indented for hanging indent 100 E127 continuation line over-indented for visual indent 885 E128 continuation line under-indented for visual indent 462 E201 whitespace after '[' 201 E202 whitespace before ')' 438 E203 whitespace before ':' 8 E211 whitespace before '[' 100 E221 multiple spaces before operator 12 E222 multiple spaces after operator 14 E225 missing whitespace around operator 1 E227 missing whitespace around bitwise or shift operator 1 E228 missing whitespace around modulo operator 213 E231 missing whitespace after ',' 47 E251 unexpected spaces around keyword / parameter equals 129 E261 at least two spaces before inline comment 227 E262 inline comment should start with '# ' 1 E271 multiple spaces after keyword 50 E301 expected 1 blank line, found 0 673 E302 expected 2 blank lines, found 1 41 E303 too many blank lines (2) 41 E401 multiple imports on one line 307 E501 line too long (93> 79 characters) 88 E502 the backslash is redundant between brackets 12 E701 multiple statements on one line (colon) 11 E703 statement ends with a semicolon 3 E711 comparison to None should be 'if cond is not None:' 3 E712 comparison to True should be 'if cond is True:' or 'if cond:' 2 E721 do not compare types, use 'isinstance()' 114 W191 indentation contains tabs 189 W291 trailing whitespace 334 W293 blank line contains whitespace 21 W391 blank line at end of file 11 W601 .has_key() is deprecated, use 'in' ================================================
----------------------------------------
Date: Fri, 27 Feb 2015 17:29:35 -0800 From: zach@mandolincreekfarm.com To: chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] [PATCH 04/12] Add pep8 checker script (#2355)
On 02/27/2015 03:53 PM, Dan Smith wrote:
# Fake Node ID 3db4f1501a5afde03ce0fbfd6d3b45d54bee5818
Thanks for this.
+import pep8
I think this is the better way. Unfortunately, it does require a newer version of pep8 than people might have on their systems.
+checker = pep8.StyleGuide(quiet=args.stats)
Fails for me here, with StyleGuide have been missing from the pep8 0.6.1 I had on my system. You might just put a try...except around this and print a helpful message about why. Maybe around the import line as well for people (like windows folk) that won't have *anything* on their systems unless they add it.
As discussed on IRC, the problems seen on the buildbot were caused by differences in the version of pep8; I've been using 1.4.6 from stock Ubuntu, and the buildbot has 1.6.2 (from pip). Dan just committed a patch to use virtualenv to make it work for everyone using 1.4.6. I will look at moving to 1.6.2, as it obviously catches more style issues than 1.4.6.
His patch also removed --stats from the run_all_tests.sh call. That ensures that the cpep.py script emits the file:line information required to fix the issues that it sees.
-- Zach Welch Mandolin Creek Farm www.mandolincreekfarm.com farm: 541-453-4131 cell: 541-740-3410 _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers