From 071825696ef07c276ae4c9511c9a1cf915b54f97 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek <478555+bieniu@users.noreply.github.com> Date: Mon, 4 Mar 2024 22:13:01 +0100 Subject: [PATCH] Suggested change --- tools/common/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/common/__init__.py b/tools/common/__init__.py index 032d5020..16ecbd15 100644 --- a/tools/common/__init__.py +++ b/tools/common/__init__.py @@ -104,11 +104,11 @@ def print_block_device(device: BlockDevice) -> None: info = block.info(attr) if value is None: - value = "-" # noqa: PLW2901 + _value = value if value is not None else "-" unit = " " + info[BLOCK_VALUE_UNIT] if BLOCK_VALUE_UNIT in info else "" - print(f"{attr.ljust(16)}{value}{unit}") + print(f"{attr.ljust(16)}{_value}{unit}") print()