pacman/repo: use StrEnum (#3088)

This commit is contained in:
codefiles 2025-01-07 20:13:11 -05:00 committed by GitHub
parent 10a12dc855
commit c081f77d57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -20,11 +20,11 @@ class Config:
if Repo.TESTING in self.repos:
if Repo.MULTILIB in self.repos:
repos_pattern = f'({Repo.MULTILIB.value}|.+-{Repo.TESTING.value})'
repos_pattern = f'({Repo.MULTILIB}|.+-{Repo.TESTING})'
else:
repos_pattern = f'(?!{Repo.MULTILIB.value}).+-{Repo.TESTING.value}'
repos_pattern = f'(?!{Repo.MULTILIB}).+-{Repo.TESTING}'
else:
repos_pattern = Repo.MULTILIB.value
repos_pattern = Repo.MULTILIB
pattern = re.compile(rf"^#\s*\[{repos_pattern}\]$")

View File

@ -1,6 +1,6 @@
from enum import Enum
from enum import StrEnum, auto
class Repo(Enum):
MULTILIB = "multilib"
TESTING = "testing"
class Repo(StrEnum):
MULTILIB = auto()
TESTING = auto()