[chirp_devel] [PATCH 04/12] Add pep8 checker script (#2355)

Zach Welch
Fri Feb 27 17:29:35 PST 2015


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



More information about the chirp_devel mailing list