On 3/30/20 10:39 AM, Markus Armbruster wrote:
> John Snow <js...@redhat.com> writes:
>
>> This doesn't fix everything in here, but it does help clean up the
>> pylint report considerably.
>>
>> This should be 100% style changes only; the intent is to make pylint
>> more useful by working on establishing a baseline for iotests that we
>> can gate against in the future.
>>
>> Signed-off-by: John Snow <js...@redhat.com>
>> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>
>> Reviewed-by: Max Reitz <mre...@redhat.com>
>> ---
>> tests/qemu-iotests/iotests.py | 83 ++++++++++++++++++-----------------
>> 1 file changed, 43 insertions(+), 40 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
>> index 7bc4934cd2..886ae962ae 100644
>> --- a/tests/qemu-iotests/iotests.py
>> +++ b/tests/qemu-iotests/iotests.py
> [...]
>> @@ -1062,6 +1063,7 @@ def func_wrapper(test_case: QMPTestCase, *args,
>> **kwargs):
>> if usf_list:
>> test_case.case_skip('{}: formats {} are not
>> whitelisted'.format(
>> test_case, usf_list))
>> + return None
>> else:
>> return func(test_case, *args, **kwargs)
>> return func_wrapper
>> @@ -1073,6 +1075,7 @@ def skip_if_user_is_root(func):
>> def func_wrapper(*args, **kwargs):
>> if os.getuid() == 0:
>> case_notrun('{}: cannot be run as root'.format(args[0]))
>> + return None
>> else:
>> return func(*args, **kwargs)
>> return func_wrapper
>
> Observation, not demand: this trades one kind of pylint report for
> another: inconsistent-return-statements for no-else-return. PATCH 05
> suppresses no-else-return.
>
Hm, yeah. I think there was some light consensus that "no-else-return"
was perfectly fine, so this patch builds towards that specific pylintrc.
It isn't, in my opinion, a regression or lateral movement as there isn't
a pylintrc baseline yet.
--js