pmb: Reformat with Ruff 0.9 (MR 2525)

See https://astral.sh/blog/ruff-v0.9.0
This commit is contained in:
Newbyte 2025-01-11 15:15:48 +01:00 committed by Oliver Smith
parent 2be49f8caf
commit 3061e702ab
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
48 changed files with 114 additions and 145 deletions

View file

@ -51,7 +51,7 @@ def extract(flavor: str | None, chroot: Chroot, extra: bool = False) -> Path:
outside = chroot / inside
if outside.exists():
if not pmb.helpers.cli.confirm(
f"Extraction folder {outside}" " already exists." " Do you want to overwrite it?"
f"Extraction folder {outside} already exists. Do you want to overwrite it?"
):
raise RuntimeError("Aborted!")
pmb.chroot.root(["rm", "-r", inside], chroot)
@ -59,7 +59,7 @@ def extract(flavor: str | None, chroot: Chroot, extra: bool = False) -> Path:
# Extraction script (because passing a file to stdin is not allowed
# in pmbootstrap's chroot/shell functions for security reasons)
with (chroot / "tmp/_extract.sh").open("w") as handle:
handle.write("#!/bin/sh\n" f"cd {inside} && cpio -i < _initfs\n")
handle.write(f"#!/bin/sh\ncd {inside} && cpio -i < _initfs\n")
# Extract
commands = [