Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add new checker len-as-condition #1154
This new checker implements the following statement from PEP8:
This is still a work in progress mainly around lines 76-79 when we have a Compare statement. ATM I'm not handling statements like
Background: Recently I've been working with a code base which has lots of
@atodorov what's unclear with pylint errors? Your new checker simply found these violations in current pylint source. https://github.com/PyCQA/pylint/blob/master/pylint/config.py#L175 is one of errors, I'm sure rest follow the same pattern.
@rogalski thanks for the hint. I thought the pylint errors were somewhere in the code I wrote and didn't realize the new checker will run against the rest of the project. I've finalized the len_cherker, added some more tests and also updated the rest of the project where the new checker complained.
This PR is ready for review.
@atodorov Looks great! Couple more small nits. Most important bit is making sure we get the category correct.
pypy failure looks unrelated, but kicking this PR with those fixes should help us be sure