From: Thomas Huth <thuth@redhat.com>
To: Ani Sinha <anisinha@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Zhao Liu <zhao1.liu@intel.com>
Subject: [PATCH] tests/functional/x86_64/test_acpi_bits: Silence warnings reported by pylint
Date: Wed, 29 Oct 2025 09:15:14 +0100 [thread overview]
Message-ID: <20251029081514.60802-1-thuth@redhat.com> (raw)
From: Thomas Huth <thuth@redhat.com>
Pylint complains about too many positional arguments for the __init__
function of the QEMUBitsMachine class, use a "*" to enforce argument
passing by names instead (which the calling sites are doing here already).
Second, use lazy logging when calling self.log.info() with a "%s" format
string, and drop a superfluous "else:" that is not necessary after a
"raise" statement.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/x86_64/test_acpi_bits.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/functional/x86_64/test_acpi_bits.py b/tests/functional/x86_64/test_acpi_bits.py
index 9a2816533d6..ec716d643bf 100755
--- a/tests/functional/x86_64/test_acpi_bits.py
+++ b/tests/functional/x86_64/test_acpi_bits.py
@@ -57,6 +57,7 @@ class QEMUBitsMachine(QEMUMachine): # pylint: disable=too-few-public-methods
"""
def __init__(self,
binary: str,
+ *,
args: Sequence[str] = (),
wrapper: Sequence[str] = (),
name: Optional[str] = None,
@@ -225,7 +226,7 @@ def generate_bits_iso(self):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=True)
- self.log.info("grub-mkrescue output %s" % proc.stdout)
+ self.log.info("grub-mkrescue output %s", proc.stdout)
else:
subprocess.check_call([mkrescue_script, '-o',
iso_file, bits_dir],
@@ -287,9 +288,8 @@ def parse_log(self):
except AssertionError as e:
self._print_log(log)
raise e
- else:
- if os.getenv('V') or os.getenv('BITS_DEBUG'):
- self._print_log(log)
+ if os.getenv('V') or os.getenv('BITS_DEBUG'):
+ self._print_log(log)
def tearDown(self):
"""
--
2.51.0
next reply other threads:[~2025-10-29 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 8:15 Thomas Huth [this message]
2025-10-29 15:41 ` [PATCH] tests/functional/x86_64/test_acpi_bits: Silence warnings reported by pylint Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251029081514.60802-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=anisinha@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.