]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Reformat comments and shorten error messages 2993/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 31 Aug 2024 07:25:37 +0000 (10:25 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 31 Aug 2024 13:22:17 +0000 (16:22 +0300)
mkosi/__init__.py
mkosi/config.py

index 0d850bd4327928323d8b7ba65b49a73425225944..86365c2bb8fd1be280cf9441cb9241c0e025cce3 100644 (file)
@@ -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:
index e5b99ee1945cbf5e1878bece2a7787c9ad06d114..56e22c584aa969c6df325b5899727723610a0bf4 100644 (file)
@@ -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