Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
feat: block certain repositories for version detection (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmeloo authored Dec 9, 2023
1 parent e42a9f5 commit e716153
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pacup/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@

log = getLogger("rich")

# List of repositories not to be used for version detection
BANNED_REPOS = [
"appget",
"baulk",
"chocolatey",
"cygwin",
"just-install",
"scoop",
"winget",
]


class VersionStatuses(Enum):
"""The status of a version."""
Expand Down Expand Up @@ -162,7 +173,9 @@ async def get_latest_version(
if new_filtered := [
packages
for packages in filtered
if key in packages and packages[key] == value
if key in packages
and packages[key] == value
and packages["repo"] not in BANNED_REPOS
]:
filtered = new_filtered

Expand Down

0 comments on commit e716153

Please sign in to comment.