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: Kevin Wolf
Subject: Re: [PATCH v9 01/14] iotests: do a light delinting
Date: Mon, 30 Mar 2020 17:41:37 +0200
User-agent: Mutt/1.12.1 (2019-06-15)

Am 25.03.2020 um 00:20 hat John Snow geschrieben:
> 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>

> @@ -550,8 +546,8 @@ def flatten_qmp_object(self, obj, output=None, 
> basestr=''):
>          if output is None:
>              output = dict()
>          if isinstance(obj, list):
> -            for i in range(len(obj)):
> -                self.flatten_qmp_object(obj[i], output, basestr + str(i) + 
> '.')
> +            for i, atom in enumerate(obj):
> +                self.flatten_qmp_object(atom, output, basestr + str(i) + '.')

I think atom isn't strictly the right word because we expect nested data
structures (as shown by the recursive call). If I understand correctly,
what Python calls things in lists is "items".

Kevin




reply via email to

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