Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Peter Otten <__peter__@web.de> Newsgroups: comp.lang.python Subject: Re: pylint woes Date: Sun, 08 May 2016 16:19:56 +0200 Organization: None Lines: 58 Message-ID: References: <572E3967.9060206@icloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de WBy74cLxgbDwqdw+F+sCVQEdeVUnquYs9JY9QxRWJOVw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'sys': 0.05; 'socket': 0.07; 'sys,': 0.07; 'ide': 0.09; 'preferable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'times,': 0.13; 'background,': 0.16; 'complains': 0.16; 'conforming': 0.16; 'dfs': 0.16; 'fixes.': 0.16; 'gonna': 0.16; 'non-trivial': 0.16; 'program?': 0.16; 'pythonic': 0.16; 'readable': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'routinely': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'java': 0.22; 'os,': 0.22; 'programming': 0.22; 'am,': 0.23; 'code.': 0.23; 'import': 0.24; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'appear': 0.26; 'header:X-Complaints-To:1': 0.26; 'figure': 0.27; 'fine': 0.28; 'always,': 0.29; "i'm": 0.30; 'code': 0.30; 'anyone': 0.32; 'run': 0.33; 'useful': 0.33; 'problem': 0.33; 'could': 0.35; 'possible,': 0.35; "isn't": 0.35; 'unit': 0.35; 'but': 0.36; 'should': 0.36; 'tool': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'agree': 0.37; 'received:org': 0.37; 'one,': 0.37; 'version': 0.38; 'someone': 0.38; 'why': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'received:de': 0.40; 'ever': 0.60; 'side': 0.62; 'making': 0.62; 'more': 0.63; 'to,': 0.63; 'better.': 0.66; 'fall': 0.66; 'fact,': 0.67; 'opinions': 0.71; 'gotten': 0.76; "else's": 0.84; 'habits.': 0.84; 'limitations,': 0.84; 'robotic': 0.84; 'think:': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: p57bd9e71.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <572E3967.9060206@icloud.com> Xref: csiph.com comp.lang.python:108353 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?