forked from Mirror/pmbootstrap
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:
parent
4108b95d72
commit
30fde53279
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue