qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 24/33] python/qemu/machine: QEMUMachine: improve qmp() met


From: Max Reitz
Subject: Re: [PATCH v2 24/33] python/qemu/machine: QEMUMachine: improve qmp() method
Date: Tue, 1 Jun 2021 12:19:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote:
We often call qmp() with unpacking dict, like qmp('foo', **{...}).
mypy don't really like it, it things that passed unpacked dict is a

s/things/thinks/

positional argument and complains that it type should be bool (because
second argument of qmp() is conv_keys: bool).

I guess it would have been nice to see some examples of this that can now be written in a cleaner way, but well.

Allow possing dict directly, simplifying interface, and giving a way to

s/possing/passing/

satisfy mypy.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
  python/qemu/machine.py | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>




reply via email to

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