From e7161532472902ede438ff94b10fae5c4a66fab3 Mon Sep 17 00:00:00 2001 From: Mike Almeloo Date: Sat, 9 Dec 2023 20:48:28 +0100 Subject: [PATCH] feat: block certain repositories for version detection (#253) --- pacup/version.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pacup/version.py b/pacup/version.py index dc4518e..e53c1f5 100644 --- a/pacup/version.py +++ b/pacup/version.py @@ -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.""" @@ -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