From e24aaa867f405bc0b28179ffa4c4350ff38cb93e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 16 Jun 2024 14:08:13 +0200 Subject: [PATCH] Two small cleanups suggests by pylint --- mkosi/__init__.py | 4 ++-- mkosi/distributions/opensuse.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 8545ed095..fc1509529 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1904,9 +1904,9 @@ def identify_cpu(root: Path) -> tuple[Optional[Path], Optional[Path]]: return (Path(f"{vendor_id}.bin"), ucode) elif vendor_id == "GenuineIntel": uroot = root / "usr/lib/firmware/intel-ucode" - if (ucode := (uroot / f"{family:02x}-{model:02x}-{stepping:02x}")).exists(): + if (ucode := uroot / f"{family:02x}-{model:02x}-{stepping:02x}").exists(): return (Path(f"{vendor_id}.bin"), ucode) - if (ucode := (uroot / f"{family:02x}-{model:02x}-{stepping:02x}.initramfs")).exists(): + if (ucode := uroot / f"{family:02x}-{model:02x}-{stepping:02x}.initramfs").exists(): return (Path(f"{vendor_id}.bin"), ucode) return (Path(f"{vendor_id}.bin"), None) diff --git a/mkosi/distributions/opensuse.py b/mkosi/distributions/opensuse.py index bcb02b570..14a64b2ce 100644 --- a/mkosi/distributions/opensuse.py +++ b/mkosi/distributions/opensuse.py @@ -1,9 +1,9 @@ # SPDX-License-Identifier: LGPL-2.1+ import tempfile -import xml.etree.ElementTree as ElementTree from collections.abc import Iterable, Sequence from pathlib import Path +from xml.etree import ElementTree from mkosi.config import Architecture, Config from mkosi.context import Context -- 2.47.2