From ff3b44e191fb59ac926b122f50a34a1a28b54889 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Sun, 22 Sep 2024 21:51:54 -0400 Subject: [PATCH] Remove import of pyparted _ped (#2696) --- archinstall/lib/disk/device_model.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py index 6869b668..a3724f16 100644 --- a/archinstall/lib/disk/device_model.py +++ b/archinstall/lib/disk/device_model.py @@ -12,7 +12,6 @@ from typing import Optional, List, Dict, TYPE_CHECKING, Any from typing import Union import parted -import _ped # type: ignore from parted import Disk, Geometry, Partition from ..exceptions import DiskError, SysCallError @@ -582,14 +581,9 @@ class PartitionType(Enum): class PartitionFlag(Enum): - """ - Flags are taken from _ped because pyparted uses this to look - up their flag definitions: https://github.com/dcantrell/pyparted/blob/c4e0186dad45c8efbe67c52b02c8c4319df8aa9b/src/parted/__init__.py#L200-L202 - Which is the way libparted checks for its flags: https://git.savannah.gnu.org/gitweb/?p=parted.git;a=blob;f=libparted/labels/gpt.c;hb=4a0e468ed63fff85a1f9b923189f20945b32f4f1#l183 - """ - Boot = _ped.PARTITION_BOOT - XBOOTLDR = _ped.PARTITION_BLS_BOOT # Note: parted calls this bls_boot - ESP = _ped.PARTITION_ESP + Boot = parted.PARTITION_BOOT + XBOOTLDR = parted.PARTITION_BLS_BOOT # Note: parted calls this bls_boot + ESP = parted.PARTITION_ESP # class PartitionGUIDs(Enum):