mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 04:01:10 +01:00
optimize code
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user