All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: crosa@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com,
	mdroth@linux.vnet.ibm.com
Subject: Re: [PATCH 4/4] qapi: Brush off some (py)lint
Date: Wed, 04 Mar 2020 09:01:48 +0100	[thread overview]
Message-ID: <87y2sgpmz7.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <6b7e0d73-6840-3a6a-9d33-0adcec0d4c84@redhat.com> (John Snow's message of "Tue, 3 Mar 2020 17:03:27 -0500")

John Snow <jsnow@redhat.com> writes:

> On 2/27/20 9:45 AM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> I wrote some pylint cleanup for iotests recently, too. Are you targeting
> a subset of pylint errors to clean here?
>
> (Do any files pass 100%?)

Surely you're joking, Mr. Snow!

I'm chipping away at pylint's gripes.  I ran it with the following
messages disabled:

    bad-whitespace,
    fixme,
    invalid-name,
    missing-docstring,
    too-few-public-methods,
    too-many-arguments,
    too-many-branches,
    too-many-instance-attributes,
    too-many-lines,
    too-many-locals,
    too-many-statements,
    unused-argument,
    unused-wildcard-import,

These are not all obviously useless.  They're just not what I want to
focus on right now.

Remaining:

1 x C0330: Wrong continued indentation (remove 19 spaces).

    Accident, will fix in v2.

8 x R0201: Method could be a function (no-self-use)

    Yes, but the override in a sub-class does use self.

2 x W0212: Access to a protected member _body of a client class (protected-access)

    Needs cleanup, but not now.

6 x W0401: Wildcard import qapi.common (wildcard-import)

    Not sure I care.  I'd prefer not to have more wildcard imports,
    though.

2 x W0603: Using the global statement (global-statement)

    Cleanup is non-trivial.  Not now.

I also ran pycodestyle-3:

1 x E127 continuation line over-indented for visual indent

    Same as pylint's C0330, will fix in v2.

3 x E261 at least two spaces before inline comment

    I blame Emacs.  Left for another day.

8 x E501 line too long

    Left for another day.

1 x E713 test for membership should be 'not in'

    I missed that one, will fix in v2.

> Consider checking in a pylintrc file that lets others run the same
> subset of pylint tests as you are doing so that we can prevent future
> regressions.

Working towards it, slowly.

> Take a peek at [PATCH v6 0/9] iotests: use python logging​
>
> Thanks for this series. I had a very similar series sitting waiting to
> go out, but this goes further in a few places.

Thanks!



  reply	other threads:[~2020-03-04  8:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 14:45 [PATCH 0/4] qapi: Bye-bye Python 2 Markus Armbruster
2020-02-27 14:45 ` [PATCH 1/4] qapi: Inheriting from object is pointless with Python 3, drop Markus Armbruster
2020-02-27 15:30   ` Philippe Mathieu-Daudé
2020-02-27 14:45 ` [PATCH 2/4] qapi: Drop conditionals for Python 2 Markus Armbruster
2020-02-27 15:29   ` Philippe Mathieu-Daudé
2020-02-27 14:45 ` [PATCH 3/4] qapi: Use super() now we have Python 3 Markus Armbruster
2020-03-04  7:32   ` Markus Armbruster
2020-02-27 14:45 ` [PATCH 4/4] qapi: Brush off some (py)lint Markus Armbruster
2020-03-03 22:03   ` John Snow
2020-03-04  8:01     ` Markus Armbruster [this message]
2020-03-04 19:27       ` John Snow
2020-03-05  5:42         ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2sgpmz7.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.