[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes
From: |
Lukáš Doktor |
Subject: |
Re: [Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes |
Date: |
Mon, 24 Jul 2017 14:42:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Dne 21.7.2017 v 20:56 Eduardo Habkost napsal(a):
> On Fri, Jul 21, 2017 at 08:57:34AM +0200, Lukáš Doktor wrote:
>> Dne 20.7.2017 v 20:42 Eduardo Habkost napsal(a):
>>> On Thu, Jul 20, 2017 at 06:28:14PM +0200, Lukáš Doktor wrote:
>>> [...]
>>>> @@ -83,8 +80,11 @@ class QEMUQtestMachine(qemu.QEMUMachine):
>>>> socket_scm_helper=None):
>>>> if name is None:
>>>> name = "qemu-%d" % os.getpid()
>>>> - super(QEMUQtestMachine, self).__init__(binary, args, name=name,
>>>> test_dir=test_dir,
>>>> -
>>>> socket_scm_helper=socket_scm_helper)
>>>> + scm_helper = socket_scm_helper
>>>
>>> Why is this necessary?
>>>
>> to avoid > 80 chars line. It should be optimized-out by the
>> python compiler so it should not slow down the execution.
>> Alternative solution is to use:
>>
>> super(QEMUQtestMachine,
>> self.__init__(...)
>>
>> which looks IMO uglier, but I can use that in v2, should that be your
>> preferred style.
>
> I think that would be better. The purpose of the extra variable
> isn't clear when reading the code, making it more confusing.
>
OK, will fix in v2.
Lukáš
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception, (continued)
[Qemu-devel] [PATCH 10/11] qtest.py: Few pylint/style fixes, Lukáš Doktor, 2017/07/20
[Qemu-devel] [PATCH 01/11] qemu.py: Pylint/style fixes, Lukáš Doktor, 2017/07/20
[Qemu-devel] [PATCH 07/11] qmp.py: Use object-based class for QEMUMonitorProtocol, Lukáš Doktor, 2017/07/20
[Qemu-devel] [PATCH 06/11] qmp.py: Couple of pylint/style fixes, Lukáš Doktor, 2017/07/20