pylint woes

Peter Otten __peter__ at web.de
Sun May 8 10:19:56 EDT 2016


DFS wrote:

> On 5/7/2016 2:52 PM, Christopher Reimer wrote:
>> On 5/7/2016 9:51 AM, DFS wrote:
>>> Has anyone ever in history gotten 10/10 from pylint for a non-trivial
>>> program?
>>
>> I routinely get 10/10 for my code. While pylint isn't perfect and
>> idiosyncratic at times, it's a useful tool to help break bad programming
>> habits. Since I came from a Java background, I had to unlearn everything
>> from Java before I could write Pythonic code. It might help to use an
>> IDE that offers PEP8-compliant code suggestions (I use PyCharm IDE).
>>
>>> That's about as good as it's gonna get!
>>
>> You can do better.
> 
> 10/10 on pylint isn't better.  

Not always, but where you and pylint disagree I'm more likely to side with 
the tool ;)

> It's being robotic and conforming to the
> opinions of the author of that app.

The problem are the tool's limitations, the "being robotic" rather than 
following someone else's opinions.
 
> In fact, I think:
> 
> import os, sys, time, socket
> 
> is much more readable than, and preferable to,
> 
> import os
> import sys
> import time
> import socket
> 
> but pylint complains about the former.

Do you use version control?

>> You should strive for 10/10 whenever possible,
> 
> nah
> 
> 
>> figure out why you fall short and ask for help on the parts that don't
>> make sense.
> 
> I actually agree with ~3/4 of the suggestions it makes.  My code ran
> fine before pylint tore it a new one, and it doesn't appear to run any
> better after making various fixes.

Do you write unit tests?





More information about the Python-list mailing list