qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 2/3] iotests: add JobRunner class


From: John Snow
Subject: Re: [PATCH v4 2/3] iotests: add JobRunner class
Date: Thu, 14 May 2020 15:32:25 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0


On 5/14/20 11:40 AM, Kevin Wolf wrote:
> Am 14.05.2020 um 04:25 hat John Snow geschrieben:
>> The idea is that instead of increasing the arguments to job_run all the
>> time, create a more general-purpose job runner that can be subclassed to
>> do interesting things with.
>>
>> pylint note: the 'callbacks' option guards against unused warning
>> arguments in functions designated as callbacks. It does not currently
>> guard against "no-self-use" though; hence a once-off ignore.
>>
>> mypy note: QapiEvent is only a weak alias; it's fully interchangable
>> with the type it's declared as. In the future, we may wish to tighten
>> these types. For now, this communicates the rough shape of the type and
>> (more importantly) the intent.
>>
>> Signed-off-by: John Snow <address@hidden>
> 
>> +        # Listen for these events with these parameters:
>> +        self._events = {
>> +            'BLOCK_JOB_COMPLETED': match_device,
>> +            'BLOCK_JOB_CANCELLED': match_device,
>> +            'BLOCK_JOB_ERROR': match_device,
>> +            'BLOCK_JOB_READY': match_device,
>> +            'BLOCK_JOB_PENDING': match_id,
>> +            'JOB_STATUS_CHANGE': match_id
>> +        }
> 
> The old code had a trailing comma here in case we need to add more
> events later. Anyway:
> 
> Reviewed-by: Kevin Wolf <address@hidden>
> 

Whoops. I favor those too, so I'll put it back.




reply via email to

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