qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 05/14] qapi: Lazy creation of array types


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v7 05/14] qapi: Lazy creation of array types
Date: Mon, 12 Oct 2015 10:24:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 10/07/2015 10:38 AM, Markus Armbruster wrote:
>> Eric Blake <address@hidden> writes:
>> 
>>> Commit ac88219a had several TODO markers about whether we needed
>>> to automatically create the corresponding array type alongside
>>> any other type.  It turns out that most of the time, we don't!
>>>
>
>>> +    def _make_simple_variant(self, case, typ, info):
>>>          if isinstance(typ, list):
>>>              assert len(typ) == 1
>>> -            typ = self._make_array_type(typ[0])
>>> -        typ = self._make_implicit_object_type(typ, 'wrapper',
>>> -                                              [self._make_member('data', 
>>> typ)])
>>> +            typ = self._make_array_type(typ[0], info)
>>> +        typ = self._make_implicit_object_type(
>>> +            typ, 'wrapper', [self._make_member('data', typ, info)])
>> 
>> I'd indent the hanging intent a bit more, to make the = stand out.
>
> pep8 doesn't like it:
>
> scripts/qapi.py:1299:17: E126 continuation line over-indented for
> hanging indent

Meh.

See also https://github.com/PyCQA/pep8/issues/167

> but it was okay with:
>
>     type = (self._make_implicit_object_type(
>             type, ...))
>
> and that does look a little better.

I find it a bit stilted.  Let's stick with your first version.



reply via email to

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