]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Two small cleanups suggests by pylint 2789/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 16 Jun 2024 12:08:13 +0000 (14:08 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 27 Jun 2024 12:58:40 +0000 (14:58 +0200)
mkosi/__init__.py
mkosi/distributions/opensuse.py

index 8545ed095109c7983405b015c6ad6ed95d89aa5a..fc1509529322fc8b48b1f746e475c16468e31c9f 100644 (file)
@@ -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)
index bcb02b57095899852e843b01ed69fc053fca2b4a..14a64b2ce004a1e484afdb0feb6c3fc526bdb6bf 100644 (file)
@@ -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