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

Vladimir Sementsov-Ogievskiy posted 16 patches 2 years, 11 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
There is a newer version of this series
[PATCH v5 01/16] python: fix superfluous-parens pylint error
Posted by Vladimir Sementsov-Ogievskiy 2 years, 11 months ago
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(-)

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
Re: [PATCH v5 01/16] python: fix superfluous-parens pylint error
Posted by John Snow 2 years, 11 months ago
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
>