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:
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 = [],
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", [])
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