
On 02/26/2015 04:41 PM, Dan Smith wrote:
# HG changeset patch # User Zach Welch zach@mandolincreekfarm.com
Add pep8 checker script (#2355)
When I apply this and run it thusly:
TESTS=pep8 ./run_all_tests.sh
Since TESTS is now an array, I use "TESTS=( pep8 )", but I think that it should work either way for a single test.
I get this:
./chirpc
... snip like a hundred lines ...
./chirpc ./chirpc ./chirpc ./chirpc ./chirpc 194 E101 indentation contains mixed spaces and tabs 6 E221 multiple spaces before operator 5 E302 expected 2 blank lines, found 1 1 E501 line too long (80 characters) 194 W191 indentation contains tabs 2 W293 blank line contains whitespace 1 W391 blank line at end of file ================================================ Tests FAILED: pep8, driver tests
Didn't look to see why.
Well, I bet I know why you got those pep8 failures: the next patch fixes the style issues. I reordered them and didn't think about the consequences. D'oh.
As to the 100 lines of "./chirpc", that's completely new to me.
....
So, I think this should import and use pep8 as a library instead of running the command line, as is common practice. You can customize it extensively that way and it's a little more integrated. See this for starters:
http://pep8.readthedocs.org/en/latest/advanced.html
...but there are some good examples elsewhere. Should be able to do everything you need that way.
I didn't consider that possibility. I agree. I'll revisit it tonight.