Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #108290
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Terry Reedy <tjreedy@udel.edu> |
| Newsgroups | comp.lang.python |
| Subject | Re: pylint woes |
| Date | Sat, 7 May 2016 15:40:23 -0400 |
| Lines | 99 |
| Message-ID | <mailman.468.1462650038.32212.python-list@python.org> (permalink) |
| References | <ngl677$68p$1@dont-email.me> <nglgb9$lkb$1@ger.gmane.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de WRkQfi0okxWMGlr3K/HAZAb9KOJf+LFwmkHER6A5JPgw== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'warnings': 0.03; 'fixes': 0.05; 'installed.': 0.05; 'feature.': 0.07; 'newline': 0.07; 'trailing': 0.07; 'check.': 0.09; 'fix.': 0.09; 'imports': 0.09; 'pyodbc': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'release,': 0.09; 'tab': 0.09; 'bug': 0.10; 'jan': 0.11; '"your': 0.16; 'accessible,': 0.16; 'dfs': 0.16; 'docstring': 0.16; 'idlelib': 0.16; 'macro': 0.16; 'member"': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'reorder': 0.16; 'skip:| 20': 0.16; 'somewhere.': 0.16; 'statments': 0.16; 'wrote:': 0.16; 'copied': 0.18; 'skip:+ 40': 0.18; ';-)': 0.18; 'variable': 0.18; 'first,': 0.20; 'fix': 0.21; 'disable': 0.22; 'strip': 0.22; 'suppose': 0.22; 'tkinter': 0.22; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'header :User-Agent:1': 0.26; 'appear': 0.26; 'command': 0.26; 'header:X -Complaints-To:1': 0.26; 'object,': 0.27; 'this.': 0.28; "skip:' 10": 0.28; 'consistency': 0.29; 'disabling': 0.29; 'helpful.': 0.29; 'pep': 0.29; 'whitespace': 0.29; "i'm": 0.30; 'comments': 0.30; 'you?': 0.30; 'code': 0.30; 'skip:- 30': 0.32; 'says': 0.32; 'compiled': 0.32; 'source': 0.33; 'editor': 0.34; 'this?': 0.34; 'could': 0.35; 'files,': 0.35; 'replace': 0.35; 'comment': 0.35; 'sometimes': 0.35; 'but': 0.36; 'should': 0.36; 'modules': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'received:org': 0.37; 'missing': 0.37; 'things': 0.38; 'doing': 0.38; 'difference': 0.38; 'files': 0.38; 'end': 0.39; 'why': 0.39; 'format': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'yes': 0.62; 'received:96': 0.63; 'latest': 0.64; 'between': 0.65; 'believe': 0.66; 'worth': 0.67; 'saving': 0.70; 'guideline': 0.84; 'habit.': 0.84; 'happier': 0.84; 'order:': 0.84; 'rated': 0.84; 'skip:| 10': 0.84; 'surround': 0.84; '|message': 0.84; 'comment.': 0.91; 'received:fios.verizon.net': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | pool-96-227-207-81.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
| In-Reply-To | <ngl677$68p$1@dont-email.me> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <nglgb9$lkb$1@ger.gmane.org> |
| X-Mailman-Original-References | <ngl677$68p$1@dont-email.me> |
| Xref | csiph.com comp.lang.python:108290 |
Show key headers only | View raw
On 5/7/2016 12:51 PM, DFS wrote:
> This more-anal-than-me program generated almost 2 warnings for every
> line of code in my program. w t hey?
If you don't like it, why do you use it?
I suppose the answer is that it did find a few things to check. You
might be happier with pychecker, which is much less aggressive. I
believe will find the things you did fix.
> DFS comments
> +-------------------------+------------+ -------------------------------
> |message id |occurrences |
> +=========================+============+
> |mixed-indentation |186 | I always use tab
> +-------------------------+------------+
> |invalid-name |82 | every single variable name?!
I would need examples to comment.
> +-------------------------+------------+
> |trailing-whitespace |59 | heh!
Any code editor should have a command to fix this.
IDLE: Format => strip trailing whitespace
Notepad++: Macro => trim trailing and save, Alt-Shift-S
others ...
> +-------------------------+------------+
> |no-member |5 |
>
> "Module 'pyodbc' has no 'connect' member" Yes it does.
> "Module 'pyodbc' has no 'Error' member" Yes it does.
>
> Issue with pylint, or pyodbc?
Worth looking into. Could be a bug somewhere. But I don't have pyodbc
installed.
> +-------------------------+------------+
> |line-too-long |5 | meh
For following the PEP guideline when patching CPython, this is helpful.
> +-------------------------+------------+
> |wrong-import-order |4 | does it matter?
Consistency in imports ultimately makes easier reading.
Many idlelib files use this order: stdlib modules other than tkinter and
idlelib (alphabetically); tkinter (tkinter first, then submodules);
idlelib (alphabetically). When I edit files, I sometimes reorder
imports to conform.
> +-------------------------+------------+
> |missing-docstring |4 | what's the difference between
> a docstring and a # comment?
# Comments only appear in the source
'''Docstrings are copied to the compiled code object, are interactively
accessible, and are used for help(ojb) output.'''
> +-------------------------+------------+
> |superfluous-parens |3 | I like to surround 'or'
> statments with parens
I would need examples to comment
> +-------------------------+------------+
> |bad-builtin |2 | warning because I used filter?
If they are still doing this in the latest release, it is an arrogance
and inconsistency bug on their part. Disable this check.
> +-------------------------+------------+
> |missing-final-newline |1 | I'm using Notepad++, with
> EOL Conversion set to
> 'Windows Format'.
That says to replace final '\n' with '\r\n'. It does not affect a
missing final newline ;-)
How or should I fix this?
Fix by hitting 'Enter' at the end of the last line.
Should you? I think it a good habit.
> After fixes and disabling various warnings:
> "Your code has been rated at 8.37/10"
Being able to customize pylint by turning off warnings is its saving
feature.
--
Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pylint woes DFS <nospam@dfs.com> - 2016-05-07 12:51 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 03:01 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-07 21:16 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 11:36 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-07 22:15 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 12:50 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-10 18:36 -0400
Re: pylint woes MRAB <python@mrabarnett.plus.com> - 2016-05-11 02:02 +0100
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-07 19:14 -0700
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-07 23:04 -0400
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-07 20:46 -0700
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 10:26 -0400
Re: pylint woes Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-05-08 08:50 +0300
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 10:25 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-09 00:36 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 11:06 -0400
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-08 08:15 -0700
Re: pylint woes Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-09 13:17 +1200
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-09 12:18 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 22:58 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-09 01:15 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 17:06 -0400
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-08 08:11 -0700
Re: pylint woes Steven D'Aprano <steve@pearwood.info> - 2016-05-09 01:51 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 17:04 -0400
Re: pylint woes Steven D'Aprano <steve@pearwood.info> - 2016-05-09 13:09 +1000
Re: pylint woes MRAB <python@mrabarnett.plus.com> - 2016-05-08 03:21 +0100
Re: pylint woes Steven D'Aprano <steve@pearwood.info> - 2016-05-08 21:36 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 17:24 -0400
Re: pylint woes Joel Goldstick <joel.goldstick@gmail.com> - 2016-05-08 17:39 -0400
Re: pylint woes Steven D'Aprano <steve@pearwood.info> - 2016-05-09 13:46 +1000
Re: pylint woes Michael Selik <michael.selik@gmail.com> - 2016-05-07 18:42 +0000
Re: pylint woes Peter Pearson <pkpearson@nowhere.invalid> - 2016-05-07 18:43 +0000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 17:05 -0400
Re: pylint woes Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-07 11:52 -0700
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-07 23:38 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 13:56 +1000
Re: pylint woes Peter Otten <__peter__@web.de> - 2016-05-08 16:19 +0200
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-07 12:21 -0700
Re: pylint woes Stephen Hansen <me@ixokai.io> - 2016-05-07 12:23 -0700
Re: pylint woes Terry Reedy <tjreedy@udel.edu> - 2016-05-07 15:40 -0400
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-07 23:28 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 13:51 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 00:40 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 14:55 +1000
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-07 20:55 -0700
Re: pylint woes Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-07 23:09 -0600
Re: pylint woes Peter Otten <__peter__@web.de> - 2016-05-08 16:12 +0200
Re: pylint woes Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-07 12:43 -0700
Re: pylint woes Ray Cote <rgacote@appropriatesolutions.com> - 2016-05-07 15:52 -0400
Re: pylint woes Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-07 13:20 -0700
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 07:56 +1000
Re: pylint woes Terry Reedy <tjreedy@udel.edu> - 2016-05-07 21:44 -0400
Re: pylint woes Steven D'Aprano <steve@pearwood.info> - 2016-05-08 13:25 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 00:10 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 14:21 +1000
Re: pylint woes "D'Arcy J.M. Cain" <darcy@VybeNetworks.com> - 2016-05-08 08:50 -0400
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-08 23:01 +1000
Re: pylint woes Larry Hudson <orgnut@yahoo.com> - 2016-05-08 13:45 -0700
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-09 08:07 +1000
Re: pylint woes Larry Hudson <orgnut@yahoo.com> - 2016-05-08 18:28 -0700
Re: pylint woes Dan Sommers <dan@tombstonezero.net> - 2016-05-08 20:49 +0000
Re: pylint woes Chris Angelico <rosuav@gmail.com> - 2016-05-09 08:10 +1000
Re: pylint woes Steven D'Aprano <steve@pearwood.info> - 2016-05-09 03:25 +1000
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 17:16 -0400
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-08 14:38 -0700
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 17:46 -0400
Re: pylint woes Stephen Hansen <me+python@ixokai.io> - 2016-05-08 15:05 -0700
Re: pylint woes DFS <nospam@dfs.com> - 2016-05-08 18:24 -0400
csiph-web