From 4dfa2d1962ed0752748fedc4b148fe19d037edf2 Mon Sep 17 00:00:00 2001 From: Juho Inkinen <34240031+juhoinkinen@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:12:08 +0300 Subject: [PATCH] Resolve SonarCloud complain: Remove unused parameter token --- annif/hfh_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/annif/hfh_util.py b/annif/hfh_util.py index bc421aa3..6f279467 100644 --- a/annif/hfh_util.py +++ b/annif/hfh_util.py @@ -32,7 +32,7 @@ def check_is_download_allowed(trust_repo, repo_id, token): f'Download allowed from "{repo_id}" because "--trust-repo" flag is used.' ) return - if _is_repo_in_cache(repo_id, token): + if _is_repo_in_cache(repo_id): logger.debug( f'Download allowed from "{repo_id}" because repo is already in cache.' ) @@ -42,7 +42,7 @@ def check_is_download_allowed(trust_repo, repo_id, token): ) -def _is_repo_in_cache(repo_id, token): +def _is_repo_in_cache(repo_id): from huggingface_hub import CacheNotFound, scan_cache_dir try: