|
From: | Hanna Reitz |
Subject: | Re: [PATCH v3 07/16] iotests/297: Don't rely on distro-specific linter binaries |
Date: | Fri, 17 Sep 2021 11:43:43 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 16.09.21 06:09, John Snow wrote:
'pylint-3' is another Fedora-ism. Use "python3 -m pylint" or "python3 -m mypy" to access these scripts instead. This style of invocation will prefer the "correct" tool when run in a virtual environment. Note that we still check for "pylint-3" before the test begins -- this check is now "overly strict", but shouldn't cause anything that was already running correctly to start failing. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- tests/qemu-iotests/297 | 45 ++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 19 deletions(-)
I know it sounds silly, but to be honest I have no idea if replacing `mypy` by `python3 -m mypy` is correct, because no mypy documentation seems to suggest it.
From what I understand, that’s generally how Python “binaries” work, though (i.e., installed as a module invokable with `python -m`, and then providing some stub binary that, well, effectively does this, but kind of in a weird way, I just don’t understand it), and none of the parameters seem to be hurt in this conversion, so:
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
[Prev in Thread] | Current Thread | [Next in Thread] |