[PATCH 2/6] avocado_qemu: standardize supper() call following PEP3135

Willian Rampazzo posted 6 patches 4 years, 4 months ago
Maintainers: Wainer dos Santos Moschetta <wainersm@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Cleber Rosa <crosa@redhat.com>
[PATCH 2/6] avocado_qemu: standardize supper() call following PEP3135
Posted by Willian Rampazzo 4 years, 4 months ago
PEP3135 states when calling super(), there is no need to use arguments.
This changes the calls on avocado_qemu to standardize according to
PEP3135 and avoid warnings from linters.

Signed-off-by: Willian Rampazzo <willianr@redhat.com>
---
 tests/acceptance/avocado_qemu/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index d9e1b32aa1..d2077d63cd 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -282,7 +282,7 @@ def fetch_asset(self, name,
                     asset_hash=None, algorithm=None,
                     locations=None, expire=None,
                     find_only=False, cancel_on_missing=True):
-        return super(Test, self).fetch_asset(name,
+        return super().fetch_asset(name,
                         asset_hash=asset_hash,
                         algorithm=algorithm,
                         locations=locations,
@@ -470,7 +470,7 @@ def _set_distro(self):
             self.distro.checksum = distro_checksum
 
     def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
-        super(LinuxTest, self).setUp()
+        super().setUp()
         self._set_distro()
         self.vm.add_args('-smp', '2')
         self.vm.add_args('-m', '1024')
-- 
2.31.1


Re: [PATCH 2/6] avocado_qemu: standardize supper() call following PEP3135
Posted by Willian Rampazzo 4 years, 4 months ago
Ouch, s/supper/super/ in the email title.

On Mon, Sep 20, 2021 at 5:52 PM Willian Rampazzo <willianr@redhat.com> wrote:
>
> PEP3135 states when calling super(), there is no need to use arguments.
> This changes the calls on avocado_qemu to standardize according to
> PEP3135 and avoid warnings from linters.
>
> Signed-off-by: Willian Rampazzo <willianr@redhat.com>
> ---
>  tests/acceptance/avocado_qemu/__init__.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
> index d9e1b32aa1..d2077d63cd 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -282,7 +282,7 @@ def fetch_asset(self, name,
>                      asset_hash=None, algorithm=None,
>                      locations=None, expire=None,
>                      find_only=False, cancel_on_missing=True):
> -        return super(Test, self).fetch_asset(name,
> +        return super().fetch_asset(name,
>                          asset_hash=asset_hash,
>                          algorithm=algorithm,
>                          locations=locations,
> @@ -470,7 +470,7 @@ def _set_distro(self):
>              self.distro.checksum = distro_checksum
>
>      def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
> -        super(LinuxTest, self).setUp()
> +        super().setUp()
>          self._set_distro()
>          self.vm.add_args('-smp', '2')
>          self.vm.add_args('-m', '1024')
> --
> 2.31.1
>
>