qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 01/14] iotests: do a light delinting


From: John Snow
Subject: Re: [PATCH v9 01/14] iotests: do a light delinting
Date: Mon, 30 Mar 2020 13:28:01 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0


On 3/30/20 10:39 AM, Markus Armbruster wrote:
> John Snow <address@hidden> 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 <address@hidden>
>> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
>> Reviewed-by: Max Reitz <address@hidden>
>> ---
>>  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]