tmp: Optional[Path]
@classmethod
- def empty(cls) -> "LuksSetupOutput":
+ def empty(cls) -> LuksSetupOutput:
return cls(None, None, None, None, None)
- def without_generated_root(self, args: CommandLineArguments) -> "LuksSetupOutput":
+ def without_generated_root(self, args: CommandLineArguments) -> LuksSetupOutput:
"A copy of self with .root optionally supressed"
return LuksSetupOutput(
None if is_generated_root(args) else self.root,
return self.raw.name if self.raw is not None else None
@classmethod
- def empty(cls) -> "BuildOutput":
+ def empty(cls) -> BuildOutput:
return cls(None, None, None, None, None, None, None)
# SPDX-License-Identifier: LGPL-2.1+
+from __future__ import annotations
+
import argparse
import contextlib
import dataclasses
photon = 9, PackageType.rpm
openmandriva = 10, PackageType.rpm
- def __new__(cls, number: int, package_type: PackageType) -> "Distribution":
+ def __new__(cls, number: int, package_type: PackageType) -> Distribution:
# This turns the list above into enum entries with .package_type attributes.
# See https://docs.python.org/3.9/library/enum.html#when-to-use-new-vs-init
# for an explanation.