From 5203b1dcd0e3aa16ca30824a86b56f0783abfb98 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Tue, 5 Oct 2021 18:21:38 -0600 Subject: [PATCH] storage/v2: annotations -> attr Factory --- subiquity/common/types.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/subiquity/common/types.py b/subiquity/common/types.py index 9695deb3a..c99294dd4 100644 --- a/subiquity/common/types.py +++ b/subiquity/common/types.py @@ -248,7 +248,7 @@ class Partition: number: Optional[int] = None preserve: Optional[bool] = None wipe: Optional[str] = None - annotations: Optional[List[str]] = [] + annotations: List[str] = attr.ib(default=attr.Factory(list)) mount: Optional[str] = None format: Optional[str] = None grub_device: Optional[bool] = None @@ -257,16 +257,16 @@ class Partition: @attr.s(auto_attribs=True) class Disk: id: str - partitions: List[Partition] - label: Optional[str] - type: Optional[str] + label: str + type: str size: int - ok_for_guided: Optional[bool] + usage_labels: List[str] + partitions: List[Partition] + ok_for_guided: bool ptable: Optional[str] - preserve: Optional[bool] = None - path: Optional[str] = None - free_for_partitions: Optional[int] = 0 - usage_labels: Optional[List[str]] = [] + preserve: bool + path: Optional[str] + free_for_partitions: int @attr.s(auto_attribs=True)