qemu-block
[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: Markus Armbruster
Subject: Re: [PATCH v9 01/14] iotests: do a light delinting
Date: Mon, 30 Mar 2020 16:39:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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.




reply via email to

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