[Buildbot-devel] Running Pylint on Buildbot's source code
rutsky.vladimir at gmail.com
Sat Jul 6 17:50:53 UTC 2013
On 06.07.2013 18:47, Dustin J. Mitchell wrote:
> On Fri, Jul 5, 2013 at 5:34 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
>> I'm actually fine with this kind of one-line loop, especially in
>> tests. Also, i suspect W0106 will trigger on a bare
>> `json.dumps(foo)`, which we often use in tests to verify that
>> something is JSON-able.
Why not use usual one line loop instead list comprehension?
for c in '5:hello,5:world,': p.feed(c)
[p.feed(c) for c in '5:hello,5:world,']
> In fact, most of our pylint violations are probably in the tests,
> where we do funny things in order to simulate desired circumstances
> for the tests. Is there a way to apply a more stringent set of
> requirements to the production code than to the test code?
As I see W0106 (expression-not-assigned) emerges only for those four
example that I mentioned before. It doesn't emerge for "json.dumps(foo)"
or in other Buildbot code.
More information about the devel