optimize code

This commit is contained in:
mulin.lyh
2024-07-31 17:01:06 +08:00
parent 2b4f09f999
commit 775c29ef79
2 changed files with 1 additions and 4 deletions

View File

@@ -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,

View File

@@ -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(