]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't name unused variable in find_unused_vsock_cid
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 23 Dec 2025 16:16:38 +0000 (17:16 +0100)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 23 Dec 2025 17:37:45 +0000 (18:37 +0100)
This fixes B007 [1].

[1] https://docs.astral.sh/ruff/rules/unused-loop-control-variable/

mkosi/qemu.py

index d1aff439b477dd3c3597d448c8a8af30fe94b5b0..89d71e3f557d985d11341032c0a9d54ec134697e 100644 (file)
@@ -152,7 +152,7 @@ def find_unused_vsock_cid(config: Config, vfd: int) -> int:
 
         hash.update(i.to_bytes(length=4, byteorder="little"))
 
-    for i in range(64):
+    for _ in range(64):
         cid = random.randint(0, 0xFFFFFFFF - 1)
 
         if not vsock_cid_in_use(vfd, cid):