From c13dfb5df50846a4e8e9691eb125f8a56deb05b6 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 17 Nov 2026 09:15:44 +0100 Subject: [PATCH] refactor: quote the pack type aliases The aliases under TYPE_CHECKING hold no union a 3.9 parser would evaluate, and two docstrings drop their clause semicolons. --- scripts/generate_pack.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_pack.py b/scripts/generate_pack.py index 9ba5304c7..ea76c0038 100644 --- a/scripts/generate_pack.py +++ b/scripts/generate_pack.py @@ -195,10 +195,10 @@ if TYPE_CHECKING: # How a manifest settles a platform declaration: the copy served, or None # and why not. - _Settle = Callable[[dict, str, str, str | None], tuple[str | None, str]] + _Settle = Callable[[dict, str, str, "str | None"], "tuple[str | None, str]"] # What a destination came to: its entries, whether it was filled, and the # report to make if no other member of its set fills it. - _Outcome = tuple[list[dict], bool, Callable[[], None] | None] + _Outcome = tuple[list[dict], bool, "Callable[[], None] | None"] yaml = require_yaml() @@ -3560,7 +3560,7 @@ def _run_verify_packs(args: argparse.Namespace) -> None: def _verification_summary(failing: list[str], verified: int, output_dir: str) -> bool: - """Print how --verify-packs ended; False when nothing was verified.""" + """Print how --verify-packs ended. False when nothing was verified.""" if failing: # Named at the end, where the log is read, and on stderr, as the # build path does: a failing pack sat among its own error lines. @@ -4143,7 +4143,7 @@ def _run_quick_mode( args: argparse.Namespace, parser: argparse.ArgumentParser, held: contextlib.ExitStack, ) -> bool: """Run a mode that builds nothing (a check of existing packs, the target - lists, a listing); True when one ran.""" + lists, a listing). True when one ran.""" # Quick-exit modes: --verify-packs alone = verify existing packs only # Combined with --all-variants, generation runs first then verify if args.verify_packs and not args.all_variants: