Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions archinstall/lib/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,13 +753,13 @@ class PartitionType(StrEnum):
PRIMARY = auto()
_UNKNOWN = 'unknown'

@classmethod
def get_type_from_code(cls, code: int) -> Self:
@staticmethod
def get_type_from_code(code: int) -> PartitionType:
if code == parted.PARTITION_NORMAL:
return cls.PRIMARY
return PartitionType.PRIMARY
else:
debug(f'Partition code not supported: {code}')
return cls._UNKNOWN
return PartitionType._UNKNOWN

def get_partition_code(self) -> int | None:
if self == PartitionType.PRIMARY:
Expand Down