]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Be specific about noqa tags
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Mon, 7 Oct 2024 08:34:00 +0000 (10:34 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Mon, 7 Oct 2024 10:42:53 +0000 (12:42 +0200)
mkosi/__init__.py
mkosi/bootloader.py
mkosi/manifest.py
mkosi/qemu.py

index a96943f79bf304f5715a5971ab058da21bd9de9c..7436a1eda7e95da1f97750162dd6b8e3b7b67917 100644 (file)
@@ -1529,7 +1529,7 @@ def run_ukify(
                 "--secureboot-certificate", workdir(context.config.secure_boot_certificate),
             ]  # fmt: skip
             opt += [
-                "--ro-bind", context.config.secure_boot_certificate, workdir(context.config.secure_boot_certificate), # noqa
+                "--ro-bind", context.config.secure_boot_certificate, workdir(context.config.secure_boot_certificate),  # noqa: E501
             ]  # fmt: skip
             if context.config.secure_boot_key_source.type == KeySourceType.engine:
                 cmd += ["--signing-engine", context.config.secure_boot_key_source.source]
@@ -1544,7 +1544,7 @@ def run_ukify(
             cmd += [
                 "--signtool", "pesign",
                 "--secureboot-certificate-dir", workdir(context.workspace / "pesign"),
-                "--secureboot-certificate-name", certificate_common_name(context, context.config.secure_boot_certificate), # noqa
+                "--secureboot-certificate-name", certificate_common_name(context, context.config.secure_boot_certificate),  # noqa: E501
             ]  # fmt: skip
             opt += ["--ro-bind", context.workspace / "pesign", workdir(context.workspace / "pesign")]
 
@@ -1607,14 +1607,14 @@ def build_uki(
                 "--pcr-public-key", workdir(context.config.sign_expected_pcr_certificate),
             ]  # fmt: skip
             options += [
-                "--ro-bind", context.config.sign_expected_pcr_certificate, workdir(context.config.sign_expected_pcr_certificate), # noqa
+                "--ro-bind", context.config.sign_expected_pcr_certificate, workdir(context.config.sign_expected_pcr_certificate),  # noqa: E501
                 "--bind-try", "/run/pcscd", "/run/pcscd",
             ]  # fmt: skip
 
         if context.config.sign_expected_pcr_key.exists():
             arguments += ["--pcr-private-key", workdir(context.config.sign_expected_pcr_key)]
             options += [
-                "--ro-bind", context.config.sign_expected_pcr_key, workdir(context.config.sign_expected_pcr_key), # noqa
+                "--ro-bind", context.config.sign_expected_pcr_key, workdir(context.config.sign_expected_pcr_key),  # noqa: E501
             ]  # fmt: skip
         else:
             arguments += ["--pcr-private-key", context.config.sign_expected_pcr_key]
@@ -1838,7 +1838,7 @@ def install_type1(
                         linux /{kimg.relative_to(context.root / "boot")} {" ".join(cmdline)}
                         initrd {" ".join(os.fspath(Path("/") / i.relative_to(context.root / "boot")) for i in initrds)}
                     }}
-                    """  # noqa
+                    """  # noqa: E501
                 )
             )
 
@@ -4024,7 +4024,7 @@ def finalize_default_tools(args: Args, config: Config, *, resources: Path) -> Co
         "--incremental", str(config.incremental),
         *([f"--package={package}" for package in config.tools_tree_packages]),
         "--output", f"{config.tools_tree_distribution}-tools",
-        *(["--source-date-epoch", str(config.source_date_epoch)] if config.source_date_epoch is not None else []),  # noqa
+        *(["--source-date-epoch", str(config.source_date_epoch)] if config.source_date_epoch is not None else []),  # noqa: E501
         *([f"--environment={k}='{v}'" for k, v in config.environment.items()]),
         *([f"--extra-search-path={p}" for p in config.extra_search_paths]),
         *(["--proxy-url", config.proxy_url] if config.proxy_url else []),
@@ -4099,7 +4099,7 @@ def run_clean_scripts(config: Config) -> None:
                             "--dir", "/work/out",
                             "--ro-bind", script, "/work/clean",
                             "--ro-bind", json, "/work/config.json",
-                            *(["--bind", str(o), "/work/out"] if (o := config.output_dir_or_cwd()).exists() else []),  # noqa
+                            *(["--bind", str(o), "/work/out"] if (o := config.output_dir_or_cwd()).exists() else []),  # noqa: E501
                             *sources,
                         ],
                     ),
index 2fc91691c369ae82dc7ba194dfa6c9d5e52401d2..f347c352c0dac137a3969d674764326da4fc762b 100644 (file)
@@ -472,7 +472,7 @@ def pesign_prepare(context: Context) -> None:
                 binary="openssl",
                 options=[
                     "--ro-bind", context.config.secure_boot_key, workdir(context.config.secure_boot_key),
-                    "--ro-bind", context.config.secure_boot_certificate, workdir(context.config.secure_boot_certificate), # noqa
+                    "--ro-bind", context.config.secure_boot_certificate, workdir(context.config.secure_boot_certificate),  # noqa: E501
                 ],
             ),
         )  # fmt: skip
@@ -490,7 +490,7 @@ def pesign_prepare(context: Context) -> None:
         sandbox=context.sandbox(
             binary="pk12util",
             options=[
-                "--ro-bind", context.workspace / "secure-boot.p12", workdir(context.workspace / "secure-boot.p12"), # noqa
+                "--ro-bind", context.workspace / "secure-boot.p12", workdir(context.workspace / "secure-boot.p12"),  # noqa: E501
                 "--ro-bind", context.workspace / "pesign", workdir(context.workspace / "pesign"),
             ],
         ),
@@ -512,7 +512,7 @@ def sign_efi_binary(context: Context, input: Path, output: Path) -> Path:
             "--output", workdir(output),
         ]  # fmt: skip
         options: list[PathString] = [
-            "--ro-bind", context.config.secure_boot_certificate, workdir(context.config.secure_boot_certificate),  # noqa
+            "--ro-bind", context.config.secure_boot_certificate, workdir(context.config.secure_boot_certificate),  # noqa: E501
             "--ro-bind", input, workdir(input),
             "--bind", output.parent, workdir(output.parent),
         ]  # fmt: skip
@@ -729,7 +729,7 @@ def install_systemd_boot(context: Context) -> None:
                         binary="sbsiglist",
                         options=[
                             "--bind", context.workspace, workdir(context.workspace),
-                            "--ro-bind", context.workspace / "mkosi.der", workdir(context.workspace / "mkosi.der"),  # noqa
+                            "--ro-bind", context.workspace / "mkosi.der", workdir(context.workspace / "mkosi.der"),  # noqa: E501
                         ]
                     ),
                 )  # fmt: skip
@@ -748,7 +748,7 @@ def install_systemd_boot(context: Context) -> None:
                         "--ro-bind",
                         context.config.secure_boot_certificate,
                         workdir(context.config.secure_boot_certificate),
-                        "--ro-bind", context.workspace / "mkosi.esl", workdir(context.workspace / "mkosi.esl"),  # noqa
+                        "--ro-bind", context.workspace / "mkosi.esl", workdir(context.workspace / "mkosi.esl"),  # noqa: E501
                         "--bind", keys, workdir(keys),
                     ]  # fmt: skip
                     if context.config.secure_boot_key_source.type == KeySourceType.engine:
@@ -757,7 +757,7 @@ def install_systemd_boot(context: Context) -> None:
                     if context.config.secure_boot_key.exists():
                         cmd += ["--key", workdir(context.config.secure_boot_key)]
                         options += [
-                            "--ro-bind", context.config.secure_boot_key, workdir(context.config.secure_boot_key),  # noqa
+                            "--ro-bind", context.config.secure_boot_key, workdir(context.config.secure_boot_key),  # noqa: E501
                         ]  # fmt: skip
                     else:
                         cmd += ["--key", context.config.secure_boot_key]
index dd047354b1be6f4071f7d13fe387744f8017fb1b..d27a66200adda6786d015ed47276d9a12aee730d 100644 (file)
@@ -175,7 +175,7 @@ class Manifest:
                 "dpkg-query",
                 "--admindir=/buildroot/var/lib/dpkg",
                 "--show",
-                "--showformat", r"${Package}\t${source:Package}\t${Version}\t${Architecture}\t${Installed-Size}\t${db-fsys:Last-Modified}\n",  # noqa
+                "--showformat", r"${Package}\t${source:Package}\t${Version}\t${Architecture}\t${Installed-Size}\t${db-fsys:Last-Modified}\n",  # noqa: E501
             ],
             stdout=subprocess.PIPE,
             sandbox=self.context.sandbox(
index 93ce6b247c55d039d1a124c86f1a92cc56f906c8..01d2b5945c515c1c7cebe3ffbcd1bdfb6f5c36a6 100644 (file)
@@ -1279,7 +1279,7 @@ def run_qemu(args: Args, config: Config) -> None:
         if config.output_format in (OutputFormat.disk, OutputFormat.esp):
             direct = fname.stat().st_size % resource.getpagesize() == 0
             ephemeral = config.ephemeral
-            cache = f"cache.writeback=on,cache.direct={yes_no(direct)},cache.no-flush={yes_no(ephemeral)},aio=io_uring"  # noqa
+            cache = f"cache.writeback=on,cache.direct={yes_no(direct)},cache.no-flush={yes_no(ephemeral)},aio=io_uring"  # noqa: E501
             cmdline += [
                 "-drive", f"if=none,id=mkosi,file={fname},format=raw,discard=on,{cache}",
                 "-device", f"scsi-{'cd' if config.qemu_cdrom else 'hd'},drive=mkosi,bootindex=1",