From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
ehabkost@redhat.com, qemu-block@nongnu.org, philmd@redhat.com,
Max Reitz <mreitz@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [PATCH RFC WIP 0/6] iotests: delinting work-in-progress
Date: Wed, 13 May 2020 17:41:24 -0400 [thread overview]
Message-ID: <20200513214130.15375-1-jsnow@redhat.com> (raw)
I ran out of time, but I was briefly entertaining the idea of hitting
everything else in the iotests folder with the pylint and mypy beam.
This is just a draft of what I had at the time, in case someone gets
around to it before I do.
I forced all of the python scripts in this directory to Python3 and pass
the formatter check imposed by the pylintrc that we make iotests.py
adhere to, but there's no guarantee these scripts actually work. I was a
little rough around the edges.
qed.py and qcow2.py in particular abuse some python features that pylint
really doesn't like to see at all, and forcing these to pass a pylint
check was clearly fighting against the idioms in-use in those files,
with more than a few unsatisfactory hacks employed just to make pylint
shut up. They are not necessarily improvements to those scripts.
I created a Makefile check to hit the iotests themselves with the pylint
checker so we can identify when refactors to the testing infrastructure
invalidate tests we don't get to run that often; but didn't get around
to improving the quality of the tests themselves.
(Whether or not this is even worth our time is debatable, it depends on
how much effort it would take to bring them up to par. Maybe it's a lot,
I don't know.)
--js
John Snow (6):
iotests: type hint wip
Makefile: add delint WIP
nbd-fault-injector: delint
qed.py: delint
qcow2.py: delint
WIP: delint test files
tests/qemu-iotests/Makefile | 6 +
tests/qemu-iotests/iotests.py | 28 ++--
tests/qemu-iotests/nbd-fault-injector.py | 34 +++--
tests/qemu-iotests/pylintrc | 1 +
tests/qemu-iotests/qcow2.py | 156 +++++++++++++++--------
tests/qemu-iotests/qed.py | 46 ++++---
6 files changed, 173 insertions(+), 98 deletions(-)
--
2.21.1
next reply other threads:[~2020-05-13 21:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 21:41 John Snow [this message]
2020-05-13 21:41 ` [PATCH RFC WIP 1/6] iotests: type hint wip John Snow
2020-05-13 21:41 ` [PATCH RFC WIP 2/6] Makefile: add delint WIP John Snow
2020-05-13 21:41 ` [PATCH RFC WIP 3/6] nbd-fault-injector: delint John Snow
2020-05-13 21:41 ` [PATCH RFC WIP 4/6] qed.py: delint John Snow
2020-05-13 21:41 ` [PATCH RFC WIP 5/6] qcow2.py: delint John Snow
2020-05-13 21:41 ` [PATCH RFC WIP 6/6] WIP: delint test files John Snow
2020-05-14 3:15 ` [PATCH RFC WIP 0/6] iotests: delinting work-in-progress no-reply
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=20200513214130.15375-1-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).