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

Commit e716153

Browse files
authored
feat: block certain repositories for version detection (#253)
1 parent e42a9f5 commit e716153

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

pacup/version.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@
4040

4141
log = getLogger("rich")
4242

43+
# List of repositories not to be used for version detection
44+
BANNED_REPOS = [
45+
"appget",
46+
"baulk",
47+
"chocolatey",
48+
"cygwin",
49+
"just-install",
50+
"scoop",
51+
"winget",
52+
]
53+
4354

4455
class VersionStatuses(Enum):
4556
"""The status of a version."""
@@ -162,7 +173,9 @@ async def get_latest_version(
162173
if new_filtered := [
163174
packages
164175
for packages in filtered
165-
if key in packages and packages[key] == value
176+
if key in packages
177+
and packages[key] == value
178+
and packages["repo"] not in BANNED_REPOS
166179
]:
167180
filtered = new_filtered
168181

0 commit comments

Comments
 (0)