* [PATCH] iotests/297: pylint: ignore too many statements
@ 2021-01-28 20:04 Vladimir Sementsov-Ogievskiy
2021-01-28 20:08 ` Vladimir Sementsov-Ogievskiy
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-01-28 20:04 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, vsementsov, jsnow, qemu-devel, mreitz
Ignore two complains, which now lead to 297 failure on testenv.py and
testrunner.py.
Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476
Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
tests/qemu-iotests/297 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
index a37910b42d..3e3e0e34aa 100755
--- a/tests/qemu-iotests/297
+++ b/tests/qemu-iotests/297
@@ -73,7 +73,9 @@ def run_linters():
env['PYTHONPATH'] += os.pathsep + qemu_module_path
except KeyError:
env['PYTHONPATH'] = qemu_module_path
- subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX', *files),
+ subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX',
+ '--disable=too-many-return-statements',
+ '--disable=too-many-statements', *files),
env=env, check=False)
print('=== mypy ===')
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iotests/297: pylint: ignore too many statements
2021-01-28 20:04 [PATCH] iotests/297: pylint: ignore too many statements Vladimir Sementsov-Ogievskiy
@ 2021-01-28 20:08 ` Vladimir Sementsov-Ogievskiy
2021-01-29 9:50 ` Kevin Wolf
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-01-28 20:08 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, jsnow, qemu-devel, mreitz
28.01.2021 23:04, Vladimir Sementsov-Ogievskiy wrote:
> Ignore two complains, which now lead to 297 failure on testenv.py and
> testrunner.py.
>
> Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476
> Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
Forget to note:
I don't add exclusions to pylintrc intentionally, as I think these warnings are reasonable, and it's good that vim ALE show them.. Still, adding them to pylintrc works too if you prefer.
> tests/qemu-iotests/297 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
> index a37910b42d..3e3e0e34aa 100755
> --- a/tests/qemu-iotests/297
> +++ b/tests/qemu-iotests/297
> @@ -73,7 +73,9 @@ def run_linters():
> env['PYTHONPATH'] += os.pathsep + qemu_module_path
> except KeyError:
> env['PYTHONPATH'] = qemu_module_path
> - subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX', *files),
> + subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX',
> + '--disable=too-many-return-statements',
> + '--disable=too-many-statements', *files),
> env=env, check=False)
>
> print('=== mypy ===')
>
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iotests/297: pylint: ignore too many statements
2021-01-28 20:08 ` Vladimir Sementsov-Ogievskiy
@ 2021-01-29 9:50 ` Kevin Wolf
2021-01-29 17:57 ` John Snow
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Wolf @ 2021-01-29 9:50 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy; +Cc: jsnow, qemu-devel, qemu-block, mreitz
Am 28.01.2021 um 21:08 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 28.01.2021 23:04, Vladimir Sementsov-Ogievskiy wrote:
> > Ignore two complains, which now lead to 297 failure on testenv.py and
> > testrunner.py.
> >
> > Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476
> > Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
> > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> > ---
>
> Forget to note:
>
> I don't add exclusions to pylintrc intentionally, as I think these
> warnings are reasonable, and it's good that vim ALE show them.. Still,
> adding them to pylintrc works too if you prefer.
I would have disabled the warning completely because I don't think
length in lines is a good measure for code quality. But if we think that
these warnings are in fact reasonable, then we should fix them and not
just disable them partially.
It's the same reason why we have -Werror enabled. If you leave warnings
around without any intention to fix them, the useful warnings will drown
in the masses of intentionally ignored ones.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iotests/297: pylint: ignore too many statements
2021-01-29 9:50 ` Kevin Wolf
@ 2021-01-29 17:57 ` John Snow
0 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2021-01-29 17:57 UTC (permalink / raw)
To: Kevin Wolf, Vladimir Sementsov-Ogievskiy; +Cc: qemu-devel, qemu-block, mreitz
On 1/29/21 4:50 AM, Kevin Wolf wrote:
> Am 28.01.2021 um 21:08 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> 28.01.2021 23:04, Vladimir Sementsov-Ogievskiy wrote:
>>> Ignore two complains, which now lead to 297 failure on testenv.py and
>>> testrunner.py.
>>>
>>> Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476
>>> Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>> ---
>>
>> Forget to note:
>>
>> I don't add exclusions to pylintrc intentionally, as I think these
>> warnings are reasonable, and it's good that vim ALE show them.. Still,
>> adding them to pylintrc works too if you prefer.
>
> I would have disabled the warning completely because I don't think
> length in lines is a good measure for code quality. But if we think that
> these warnings are in fact reasonable, then we should fix them and not
> just disable them partially.
>
> It's the same reason why we have -Werror enabled. If you leave warnings
> around without any intention to fix them, the useful warnings will drown
> in the masses of intentionally ignored ones.
>
> Kevin
>
It's at least a sniff test. There are extremely valid reasons for many
of the "warnings" to be suppressed, but usually you should have to
consciously justify it, I think.
Vladimir put the suppression in pylintrc under the "Temporary" section
for v2, which I think is appropriate, so I gave it my R-B.
--js
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-29 17:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28 20:04 [PATCH] iotests/297: pylint: ignore too many statements Vladimir Sementsov-Ogievskiy
2021-01-28 20:08 ` Vladimir Sementsov-Ogievskiy
2021-01-29 9:50 ` Kevin Wolf
2021-01-29 17:57 ` John Snow
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).