Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacman/repo: use StrEnum #3088

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions archinstall/lib/pacman/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def apply(self) -> None:

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}\]$")

Expand Down
8 changes: 4 additions & 4 deletions archinstall/lib/pacman/repo.py
Original file line number Diff line number Diff line change
@@ -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()
Loading