diff mbox series

[v5,01/16] python: fix superfluous-parens pylint error

Message ID 20230215132547.1620575-2-vsementsov@yandex-team.ru (mailing list archive)
State New, archived
Headers show
Series iotests: use vm.cmd() | expand

Commit Message

Vladimir Sementsov-Ogievskiy Feb. 15, 2023, 1:25 p.m. UTC
Now make check-dev called in python/ directory fails due to this error.
Let's fix it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 python/qemu/qmp/protocol.py                            | 2 +-
 python/qemu/qmp/qmp_client.py                          | 2 +-
 tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

John Snow Feb. 20, 2023, 8:37 p.m. UTC | #1
On Wed, Feb 15, 2023 at 8:26 AM Vladimir Sementsov-Ogievskiy
<vsementsov@yandex-team.ru> wrote:
>
> Now make check-dev called in python/ directory fails due to this error.
> Let's fix it.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

Reviewed-by: John Snow <jsnow@redhat.com>

I've got a similar patch queued already in jsnow/python, I'll send the PR soon.

--js

> ---
>  python/qemu/qmp/protocol.py                            | 2 +-
>  python/qemu/qmp/qmp_client.py                          | 2 +-
>  tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py
> index 6d3d739daa..22e60298d2 100644
> --- a/python/qemu/qmp/protocol.py
> +++ b/python/qemu/qmp/protocol.py
> @@ -207,7 +207,7 @@ class AsyncProtocol(Generic[T]):
>      logger = logging.getLogger(__name__)
>
>      # Maximum allowable size of read buffer
> -    _limit = (64 * 1024)
> +    _limit = 64 * 1024
>
>      # -------------------------
>      # Section: Public interface
> diff --git a/python/qemu/qmp/qmp_client.py b/python/qemu/qmp/qmp_client.py
> index b5772e7f32..9d73ae6e7a 100644
> --- a/python/qemu/qmp/qmp_client.py
> +++ b/python/qemu/qmp/qmp_client.py
> @@ -198,7 +198,7 @@ async def run(self, address='/tmp/qemu.socket'):
>      logger = logging.getLogger(__name__)
>
>      # Read buffer limit; 10MB like libvirt default
> -    _limit = (10 * 1024 * 1024)
> +    _limit = 10 * 1024 * 1024
>
>      # Type alias for pending execute() result items
>      _PendingT = Union[Message, ExecInterruptedError]
> diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
> index fc9c4b4ef4..dda55fad28 100755
> --- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
> +++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
> @@ -84,7 +84,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
>                  e['vm'] = 'SRC'
>              for e in self.vm_b_events:
>                  e['vm'] = 'DST'
> -            events = (self.vm_a_events + self.vm_b_events)
> +            events = self.vm_a_events + self.vm_b_events
>              events = [(e['timestamp']['seconds'],
>                         e['timestamp']['microseconds'],
>                         e['vm'],
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py
index 6d3d739daa..22e60298d2 100644
--- a/python/qemu/qmp/protocol.py
+++ b/python/qemu/qmp/protocol.py
@@ -207,7 +207,7 @@  class AsyncProtocol(Generic[T]):
     logger = logging.getLogger(__name__)
 
     # Maximum allowable size of read buffer
-    _limit = (64 * 1024)
+    _limit = 64 * 1024
 
     # -------------------------
     # Section: Public interface
diff --git a/python/qemu/qmp/qmp_client.py b/python/qemu/qmp/qmp_client.py
index b5772e7f32..9d73ae6e7a 100644
--- a/python/qemu/qmp/qmp_client.py
+++ b/python/qemu/qmp/qmp_client.py
@@ -198,7 +198,7 @@  async def run(self, address='/tmp/qemu.socket'):
     logger = logging.getLogger(__name__)
 
     # Read buffer limit; 10MB like libvirt default
-    _limit = (10 * 1024 * 1024)
+    _limit = 10 * 1024 * 1024
 
     # Type alias for pending execute() result items
     _PendingT = Union[Message, ExecInterruptedError]
diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
index fc9c4b4ef4..dda55fad28 100755
--- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
+++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
@@ -84,7 +84,7 @@  class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
                 e['vm'] = 'SRC'
             for e in self.vm_b_events:
                 e['vm'] = 'DST'
-            events = (self.vm_a_events + self.vm_b_events)
+            events = self.vm_a_events + self.vm_b_events
             events = [(e['timestamp']['seconds'],
                        e['timestamp']['microseconds'],
                        e['vm'],