From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v3 11/10] iotests: add flake8 linter
Date: Fri, 15 Jan 2021 13:03:02 +0100 [thread overview]
Message-ID: <461d224e-6527-851e-c995-3cb9e2545f41@redhat.com> (raw)
In-Reply-To: <20210115115316.24633-1-vsementsov@virtuozzo.com>
On 15.01.21 12:53, Vladimir Sementsov-Ogievskiy wrote:
> pylint is good, but doesn't cover the PEP8. Let's add flake8, to be
> sure that our code sutisfy PEP8. Add new linter and fix some code style
> in checked files.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>
> Hi!
>
> Here is my small addition to Max's series, hope you like it!
>
> Note, that this is not the first occurrence of 'flake8' in Qemu:
>
> # git grep flake8
> python/qemu/.flake8:[flake8]
> scripts/qapi/.flake8:[flake8]
> scripts/qapi/.flake8:extend-ignore = E722 # Prefer pylint's bare-except checks to flake8's
>
>
> tests/qemu-iotests/129 | 6 ++-
> tests/qemu-iotests/254 | 2 +-
> tests/qemu-iotests/297 | 21 ++++++---
> tests/qemu-iotests/297.out | 1 +
> tests/qemu-iotests/300 | 4 +-
> tests/qemu-iotests/iotests.py | 88 +++++++++++++++++++++++++++++++++--
> 6 files changed, 106 insertions(+), 16 deletions(-)
Looks reasonable to me, but perhaps it should just be a dedicated
series. I think there’s enough in here to justify that.
> diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129
> index 201d9e0a0b..28e6666c1d 100755
> --- a/tests/qemu-iotests/129
> +++ b/tests/qemu-iotests/129
> @@ -21,6 +21,7 @@
> import os
> import iotests
>
> +
> class TestStopWithBlockJob(iotests.QMPTestCase):
> test_img = os.path.join(iotests.test_dir, 'test.img')
> target_img = os.path.join(iotests.test_dir, 'target.img')
> @@ -39,8 +40,8 @@ class TestStopWithBlockJob(iotests.QMPTestCase):
> source_drive = 'driver=throttle,' \
> 'node-name=source,' \
> 'throttle-group=tg0,' \
> - f'file.driver={iotests.imgfmt},' \
> - f'file.file.filename={self.test_img}'
> + f'file.driver={iotests.imgfmt},' \
> + f'file.file.filename={self.test_img}'
Interesting, when indenting this, I was wondering whether pylint would
complain. I was so glad it didn’t. I really don’t like PEP8.
(Though I understand that style guides like PEP8 are there specifically
so when someone like me goes “but I like this style better :(”, everyone
else can say “but you’re objectively wrong”. So me hating it kind of is
its point, I guess.)
Max
next prev parent reply other threads:[~2021-01-15 12:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 17:02 [PATCH v3 00/10] iotests: Fix 129 and expand 297’s reach Max Reitz
2021-01-14 17:02 ` [PATCH v3 01/10] iotests.py: Assume a couple of variables as given Max Reitz
2021-01-15 9:19 ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 02/10] iotests/297: Rewrite in Python and extend reach Max Reitz
2021-01-15 11:13 ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:57 ` Max Reitz
2021-01-15 12:37 ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 03/10] iotests: Move try_remove to iotests.py Max Reitz
2021-01-15 11:14 ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:02 ` [PATCH v3 04/10] iotests/129: Remove test images in tearDown() Max Reitz
2021-01-15 14:48 ` Willian Rampazzo
2021-01-14 17:02 ` [PATCH v3 05/10] iotests/129: Do not check @busy Max Reitz
2021-01-14 17:03 ` [PATCH v3 06/10] iotests/129: Use throttle node Max Reitz
2021-01-15 11:16 ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:58 ` Max Reitz
2021-01-14 17:03 ` [PATCH v3 07/10] iotests/129: Actually test a commit job Max Reitz
2021-01-14 17:03 ` [PATCH v3 08/10] iotests/129: Limit mirror job's buffer size Max Reitz
2021-01-15 14:49 ` Willian Rampazzo
2021-01-14 17:03 ` [PATCH v3 09/10] iotests/129: Clean up pylint and mypy complaints Max Reitz
2021-01-14 20:02 ` Willian Rampazzo
2021-01-15 9:30 ` Max Reitz
2021-01-15 14:43 ` Willian Rampazzo
2021-01-15 11:18 ` Vladimir Sementsov-Ogievskiy
2021-01-14 17:03 ` [PATCH v3 10/10] iotests/300: " Max Reitz
2021-01-15 11:30 ` Vladimir Sementsov-Ogievskiy
2021-01-15 11:59 ` Max Reitz
2021-01-15 11:53 ` [PATCH v3 11/10] iotests: add flake8 linter Vladimir Sementsov-Ogievskiy
2021-01-15 12:03 ` Max Reitz [this message]
2021-01-15 13:30 ` Vladimir Sementsov-Ogievskiy
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=461d224e-6527-851e-c995-3cb9e2545f41@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).