vermin: don't use StrEnum (MR 2252)

It was only introduced in 3.11. Instead just define __str__() manually
for the Enums where it's needed.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-15 18:55:03 +02:00 committed by Oliver Smith
parent 4108b95d72
commit 30fde53279
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 8 additions and 2 deletions

View file

@ -26,11 +26,14 @@ class SystemdConfig(enum.Enum):
return [e.value for e in SystemdConfig]
class AutoZapConfig(enum.StrEnum):
class AutoZapConfig(enum.Enum):
NO = "no"
YES = "yes"
SILENTLY = "silently"
def __str__(self) -> str:
return self.value
def enabled(self) -> bool:
return self != AutoZapConfig.NO