From 775c29ef79d3b9c90d66ea234dd10460c09ecc27 Mon Sep 17 00:00:00 2001 From: "mulin.lyh" Date: Wed, 31 Jul 2024 17:01:06 +0800 Subject: [PATCH] optimize code --- modelscope/hub/snapshot_download.py | 3 --- tests/hub/test_download_dataset_file.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modelscope/hub/snapshot_download.py b/modelscope/hub/snapshot_download.py index 76da1073..2544b58e 100644 --- a/modelscope/hub/snapshot_download.py +++ b/modelscope/hub/snapshot_download.py @@ -247,7 +247,6 @@ def _snapshot_download( None, None, headers, - revision_detail=revision_detail, repo_type=repo_type, revision=revision, cookies=cookies, @@ -290,7 +289,6 @@ def _snapshot_download( name, group_or_owner, headers, - revision_detail=revision_detail, repo_type=repo_type, revision=revision, cookies=cookies, @@ -344,7 +342,6 @@ def _download_file_lists( name: str, group_or_owner: str, headers, - revision_detail: str, repo_type: Optional[str] = None, revision: Optional[str] = DEFAULT_MODEL_REVISION, cookies: Optional[CookieJar] = None, diff --git a/tests/hub/test_download_dataset_file.py b/tests/hub/test_download_dataset_file.py index 0c4e9307..8e8712f5 100644 --- a/tests/hub/test_download_dataset_file.py +++ b/tests/hub/test_download_dataset_file.py @@ -116,7 +116,7 @@ class DownloadDatasetTest(unittest.TestCase): dataset_cache_path = dataset_snapshot_download( dataset_id=dataset_id, cache_dir=temp_cache_dir, - ignore_file_pattern='*.jpeg') + ignore_file_pattern=['*.jpeg', '.jpg']) assert dataset_cache_path == os.path.join(temp_cache_dir, dataset_id) assert not os.path.exists(