Skip to content

Commit 91854f9

Browse files
committed
boot-qemu.py: Eliminate single item container in _get_kernel_ver_tuple()
As pointed out by the refurb rules in ruff.toml: FURB171 Membership test against single-item container --> boot-qemu.py:130:12 | 129 | utils.check_cmd(decomp_prog) 130 | if decomp_prog in ('gzip',): | ^^^^^^^^^^^^^^^^^^^^^^^^ 131 | decomp_cmd = [decomp_prog, '-c', '-d', self.kernel] 132 | else: | help: Convert to equality test Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent cd00711 commit 91854f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

boot-qemu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _get_kernel_ver_tuple(self, decomp_prog: str) -> tuple[int, ...]:
126126
raise RuntimeError('No kernel set?')
127127

128128
utils.check_cmd(decomp_prog)
129-
if decomp_prog in ('gzip',):
129+
if decomp_prog == 'gzip':
130130
decomp_cmd = [decomp_prog, '-c', '-d', self.kernel]
131131
else:
132132
raise RuntimeError(f"Unsupported decompression program ('{decomp_prog}')?")

0 commit comments

Comments
 (0)