From: John Snow <jsnow@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/3] iotests: Disable unsubscriptable-object in pylint
Date: Tue, 27 Oct 2020 12:48:22 -0400 [thread overview]
Message-ID: <90b7da54-5ada-c86d-29cb-fa97e2ff9360@redhat.com> (raw)
In-Reply-To: <20201027163806.290960-3-kwolf@redhat.com>
On 10/27/20 12:38 PM, Kevin Wolf wrote:
> When run with Python 3.9, pylint incorrectly warns about things like
> Optional[foo] because it doesn't recognise Optional as unsubscriptable.
> This is a known pylint bug:
>
> https://github.com/PyCQA/pylint/issues/3882
>
> Just disable this check to get rid of the warnings.
>
> Disabling this shouldn't make us miss any real bug because mypy also
> has a similar check ("... is not indexable").
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> tests/qemu-iotests/pylintrc | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
> index 5481afe528..cd3702e23c 100644
> --- a/tests/qemu-iotests/pylintrc
> +++ b/tests/qemu-iotests/pylintrc
> @@ -17,6 +17,8 @@ disable=invalid-name,
> too-many-lines,
> too-many-locals,
> too-many-public-methods,
> + # pylint warns about Optional[] etc. as unsubscriptable in 3.9
> + unsubscriptable-object,
> # These are temporary, and should be removed:
> missing-docstring,
>
>
Reviewed-by: John Snow <jsnow@redhat.com>
next prev parent reply other threads:[~2020-10-27 16:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 16:38 [PATCH 0/3] iotests: Fix pylint/mypy warnings on F33 Kevin Wolf
2020-10-27 16:38 ` [PATCH 1/3] iotests.py: Fix type check errors in wait_migration() Kevin Wolf
2020-10-27 17:31 ` John Snow
2020-10-27 16:38 ` [PATCH 2/3] iotests: Disable unsubscriptable-object in pylint Kevin Wolf
2020-10-27 16:48 ` John Snow [this message]
2020-10-27 16:38 ` [PATCH 3/3] iotests: Use Python 3 style super() Kevin Wolf
2020-10-27 16:48 ` John Snow
2020-10-28 9:31 ` Philippe Mathieu-Daudé
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=90b7da54-5ada-c86d-29cb-fa97e2ff9360@redhat.com \
--to=jsnow@redhat.com \
--cc=kwolf@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).