Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108302

Re: pylint woes

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: pylint woes
Date Sun, 8 May 2016 07:56:37 +1000
Lines 28
Message-ID <mailman.478.1462658199.32212.python-list@python.org> (permalink)
References <ngl677$68p$1@dont-email.me> <CAGgTfkNVpVG7xfNvrDV3xfdpAojNR_0C_m4VVu_Pn2TtwenNTg@mail.gmail.com> <CAPTjJmooAR_MP=wa=xs9QeaxdgCk1xGbkb+QUdDXgX+=PJ+xYA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de PT0SXb4RxWAtEL+rM5Iy6A2VGg0Uxv8JU/xN57TMFJog==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'yet.': 0.03; 'cc:addr :python-list': 0.09; 'complaining': 0.09; 'yeah,': 0.09; "hasn't": 0.15; '120,': 0.16; '2016': 0.16; 'code?': 0.16; 'commented': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'limit,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'still,': 0.16; 'weigh': 0.16; 'wrote:': 0.16; 'skip:+ 40': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'code,': 0.23; '(or': 0.23; 'split': 0.23; 'header:In-Reply-To:1': 0.24; 'external': 0.27; 'message-id:@mail.gmail.com': 0.27; 'complain': 0.29; 'long.': 0.29; 'code': 0.30; 'programmers': 0.30; 'point': 0.33; 'michael': 0.33; 'wrap': 0.33; "i'll": 0.33; 'list': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'too': 0.36; 'instead': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'depends': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'doing': 0.38; 'received:209': 0.38; 'files': 0.38; 'data': 0.39; 'rather': 0.39; 'some': 0.40; 'your': 0.60; 'entire': 0.61; 'per': 0.62; 'limit': 0.65; "they're": 0.66; 'levels': 0.70; 'exceed': 0.72; 'sounds': 0.76; 'opt': 0.79; 'exceeded': 0.83; '*how': 0.84; 'chrisa': 0.84; 'skip:| 10': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=p8OMNwC7ck395ORxmUmelTVq1mJs+NLlKiM+TPzwUDE=; b=cDPXpwcQb/tR8Wx43K/mmeaE+KPkhjYbCCpweLlkWltfVC7wnVLqRuA09v2sjUJ0Jd kyWYXL6vAd2/GWoLgcod5hmG8og8W6ArfVrj0OkhruHFhHr104bhkFv9do9hDmjpgaRf zD4vDsbW4AAO/A1MQ5PeW2jCHWWH2t4iatIFeJbF3LIg8M9iOq8UTIi2Pw+/ejF8N1Rc vOK5nY6vS2/dU2fed48bARVbadXILusfNylSyLIBdX9c2UIz1HMavHqCZJOsW2NeG/QZ ELaxrBb9MDMXYNq2x8PtxnxpI/9sdGyVGw39Pvwp457QPbc5mWihYw6C4EDDAn9mIdjv lQLg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=p8OMNwC7ck395ORxmUmelTVq1mJs+NLlKiM+TPzwUDE=; b=G07/YmjDkHKJoGoXxa/wzzwnRDk6MzWXtTjNYW4mj3T8sWricEoXkSEiRfgFa9hLSG aDzXJ8bK3Qrt3lZdT11prrTMv8oESpBUBJdF7pj64D23MTrTh0nVgnw1GunZr8/P0eXD o7NtHkafvuxN57U7Jq3pqxyRydpTyuGtD7ZGkvGNMi94sKcVQtEUA6xjt908CN3hDiVz w2En9UJUqRZTLiaq5g0j8+rNg4XteB+L22oaveDmDGTrdpERcgiaJEEgN1/n8Vwnzumj QMSlYUimGIKvNidiXdt995Vr5W736yQ3NE5DpkAPQWQXEcDnaxDh07+zC+RV+HMeJLvj ow0A==
X-Gm-Message-State AOPr4FVH4ejGmdLHqepuj9YG2XjR+ZFz/E44OcTRmoERH9pBpPyi/dAGU63mpBb8XZiKwrIq3JawdnwiUcYcqg==
X-Received by 10.25.148.69 with SMTP id w66mr1634705lfd.28.1462658197334; Sat, 07 May 2016 14:56:37 -0700 (PDT)
In-Reply-To <CAGgTfkNVpVG7xfNvrDV3xfdpAojNR_0C_m4VVu_Pn2TtwenNTg@mail.gmail.com>
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 <CAPTjJmooAR_MP=wa=xs9QeaxdgCk1xGbkb+QUdDXgX+=PJ+xYA@mail.gmail.com>
X-Mailman-Original-References <ngl677$68p$1@dont-email.me> <CAGgTfkNVpVG7xfNvrDV3xfdpAojNR_0C_m4VVu_Pn2TtwenNTg@mail.gmail.com>
Xref csiph.com comp.lang.python:108302

Show key headers only | View raw


On Sun, May 8, 2016 at 4:42 AM, Michael Selik <michael.selik@gmail.com> wrote:
>
>> +-------------------------+------------+
>> |line-too-long            |5           | meh
>>
>
> Yeah, I think 80 characters can be somewhat tight. Still, 5 long lines in
> 200ish lines of code? Sounds like you might be doing too much in those
> lines or have too many levels of indentation.
> "Sparse is better than dense"
> "Flat is better than nested"

Others have commented on this, but I'll weigh in with one point that
hasn't been mentioned yet. A lot of tools will complain when you
exceed 80 (or 79) characters per line; but it depends somewhat on *how
far* you exceeded it. Some people opt instead for a 100-character
limit, or even 120, but most programmers agree that a 200-character
line (or more!) is too long.

So if this is complaining about five lines out of your entire program
that just snuck over the 80-character limit (eg 86 characters long),
it's not a concern, and my recommendation would be to relax the
restriction. And if those few lines are ginormous hunks of data
(static list initialization, or something), you might consider dumping
them out to external files rather than wrapping them into big code
blocks. But if they're truly long lines of code, wrap or split them.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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