[elbe-devel] [PATCH 2/2] elbevalidate: constants: make PartitionLabel a normal Enum

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Aug 6 10:27:01 CEST 2024


The values are meant to be used as symbolic constants.
The fact that they are a string are irrelevant.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbevalidate/constants.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/elbevalidate/constants.py b/elbevalidate/constants.py
index 7aca75a36efa..2618df63b2b4 100644
--- a/elbevalidate/constants.py
+++ b/elbevalidate/constants.py
@@ -2,10 +2,8 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 # SPDX-FileCopyrightText: 2024 Linutronix GmbH
 
-import enum
 
-
-class PartitionLabel(enum.StrEnum):
+class PartitionLabel(str):
     DOS = 'msdos'
     GPT = 'gpt'
 

-- 
2.46.0



More information about the elbe-devel mailing list