From: John Snow <jsnow@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v6 9/9] iotests: add pylintrc file
Date: Wed, 4 Mar 2020 14:17:48 -0500 [thread overview]
Message-ID: <ba878308-54ba-3eee-41ec-b14c19fda8b2@redhat.com> (raw)
In-Reply-To: <87h7z4r3dx.fsf@dusky.pond.sub.org>
On 3/4/20 2:22 AM, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
>
>> Repeatable results. run `pylint iotests.py` and you should get a pass.
>
> Start your sentences with a capital letter, please.
>
The German complains about the capitalization, but not the sentence
fragment.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>> tests/qemu-iotests/pylintrc | 20 ++++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>> create mode 100644 tests/qemu-iotests/pylintrc
>>
>> diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
>> new file mode 100644
>> index 0000000000..feed506f75
>> --- /dev/null
>> +++ b/tests/qemu-iotests/pylintrc
>> @@ -0,0 +1,20 @@
>> +[MESSAGES CONTROL]
>> +
>> +# Disable the message, report, category or checker with the given id(s). You
>> +# can either give multiple identifiers separated by comma (,) or put this
>> +# option multiple times (only on the command line, not in the configuration
>> +# file where it should appear only once). You can also use "--disable=all" to
>> +# disable everything first and then reenable specific checks. For example, if
>> +# you want to run only the similarities checker, you can use "--disable=all
>> +# --enable=similarities". If you want to run only the classes checker, but have
>> +# no Warning level messages displayed, use "--disable=all --enable=classes
>> +# --disable=W".
>> +disable=invalid-name,
>> + missing-docstring,
>> + line-too-long,
>> + too-many-lines,
>> + too-few-public-methods,
>> + too-many-arguments,
>> + too-many-locals,
>> + too-many-branches,
>> + too-many-public-methods,
>> \ No newline at end of file
>
> Add the newline, please.
>
> German pejorative for the too-many- and too-few- warnings: "Müsli".
> Implies it's for muesli-knitters / granola-crunchers indulging their
> orthorexia.
>
They are useful at times as they can suggest when you are going a bit
overboard on "organically grown" design. For cleaning an existing
codebase, it's more of a hindrance to the immediate goal of establishing
a baseline.
(*cough* I try to adhere to them in my own freshly written code, and
disable per-line when I've decided to veto the suggestion. Not
appropriate for a codebase like ours. As Max reminds me, it's just tests
-- don't make them too clever or pretty.)
Regardless. It's not appropriate here and now.
> missing-docstring is not advisable for libraries. Feels okay here.
>
Ideally we do start using them, but it's out of scope here. Since I did
some cleanup, I wanted to establish the baseline of what I adhered to.
*not* suggest that it's the destination state.
Adding proper docstrings should be done during mypy conversion once the
types are determined, understood, and enforced. Not before then.
> line-too-long might be worth cleaning up. How many of them do we have
> now?
>
Five in iotests.py using the default length of 100. 15 if I limit to 80.
If we agree that 100 is okay, I can tackle this in an amendment patch.
If 80 is okay, I'm going to put it off as one coat of paint too many.
(I will try to clean up the 100+ lines for my next version. I am
hesitant to make a deeper cut because I have the feeling it's the type
of series that will incur a lot of nitpicks on indent style.)
--js
next prev parent reply other threads:[~2020-03-04 19:18 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 0:06 [PATCH v6 0/9] iotests: use python logging John Snow
2020-02-27 0:06 ` [PATCH v6 1/9] iotests: do a light delinting John Snow
2020-02-27 12:59 ` Max Reitz
2020-03-03 21:25 ` John Snow
2020-03-04 11:12 ` Kevin Wolf
2020-03-04 18:35 ` John Snow
2020-02-27 0:06 ` [PATCH v6 2/9] iotests: add script_initialize John Snow
2020-02-27 13:47 ` Max Reitz
2020-03-03 21:12 ` John Snow
2020-02-27 0:06 ` [PATCH v6 3/9] iotests: replace mutable list default args John Snow
2020-02-27 13:50 ` Max Reitz
2020-02-27 0:06 ` [PATCH v6 4/9] iotest 258: use script_main John Snow
2020-02-27 13:55 ` Max Reitz
2020-02-27 14:10 ` Philippe Mathieu-Daudé
2020-02-27 0:06 ` [PATCH v6 5/9] iotests: Mark verify functions as private John Snow
2020-02-27 13:59 ` Max Reitz
2020-02-27 0:06 ` [PATCH v6 6/9] iotests: use python logging for iotests.log() John Snow
2020-02-27 14:21 ` Max Reitz
2020-03-03 20:00 ` John Snow
2020-02-27 0:06 ` [PATCH v6 7/9] iotests: ignore import warnings from pylint John Snow
2020-02-27 14:14 ` Philippe Mathieu-Daudé
2020-03-03 19:57 ` John Snow
2020-03-04 0:02 ` Philippe Mathieu-Daudé
2020-03-04 18:59 ` John Snow
2020-02-27 0:06 ` [PATCH v6 8/9] iotests: don't use 'format' for drive_add John Snow
2020-02-27 14:12 ` Philippe Mathieu-Daudé
2020-02-27 14:26 ` Max Reitz
2020-02-27 0:06 ` [PATCH v6 9/9] iotests: add pylintrc file John Snow
2020-02-27 1:57 ` Eric Blake
2020-02-27 14:11 ` Philippe Mathieu-Daudé
2020-03-03 19:52 ` John Snow
2020-03-04 7:22 ` Markus Armbruster
2020-03-04 19:17 ` John Snow [this message]
2020-03-05 5:49 ` 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=ba878308-54ba-3eee-41ec-b14c19fda8b2@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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 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.