From: Zbigniew Jędrzejewski-Szmek Date: Sat, 31 Aug 2024 07:25:37 +0000 (+0300) Subject: Reformat comments and shorten error messages X-Git-Tag: v25~325^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2993%2Fhead;p=thirdparty%2Fmkosi.git Reformat comments and shorten error messages --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 0d850bd43..86365c2bb 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4735,7 +4735,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: if all(config == Config.default() for config in images): die("No configuration found", - hint="Make sure you're running mkosi from a directory with configuration files") + hint="Make sure mkosi is run from a directory with configuration files") if args.verb == Verb.summary: if args.json: diff --git a/mkosi/config.py b/mkosi/config.py index e5b99ee19..56e22c584 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -3433,9 +3433,10 @@ class ConfigAction(argparse.Action): class ParseContext: def __init__(self, resources: Path = Path("/")) -> None: self.resources = resources - # We keep two namespaces around, one for the settings specified on the CLI and one for the settings specified - # in configuration files. This is required to implement both [Match] support and the behavior where settings - # specified on the CLI always override settings specified in configuration files. + # We keep two namespaces around, one for the settings specified on the CLI and one for + # the settings specified in configuration files. This is required to implement both [Match] + # support and the behavior where settings specified on the CLI always override settings + # specified in configuration files. self.cli = argparse.Namespace() self.config = argparse.Namespace( files = [], @@ -3813,8 +3814,7 @@ def parse_config(argv: Sequence[str] = (), *, resources: Path = Path("/")) -> tu if not args.verb.needs_config(): return args, () - # One of the specifiers needs access to the directory so let's make sure it - # is available. + # One of the specifiers needs access to the directory, so make sure it is available. setattr(context.config, "directory", args.directory) setattr(context.config, "files", []) @@ -4031,7 +4031,11 @@ def load_environment(args: argparse.Namespace) -> dict[str, str]: if gnupghome := os.getenv("GNUPGHOME"): env["GNUPGHOME"] = gnupghome - env |= dict(parse_environment(line) for f in args.environment_files for line in f.read_text().strip().splitlines()) + env |= dict( + parse_environment(line) + for f in args.environment_files + for line in f.read_text().strip().splitlines() + ) env |= args.environment return env