mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 16:27:45 +01:00
fix lint (#1168)
This commit is contained in:
@@ -9,7 +9,8 @@ from pathlib import Path
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from modelscope.hub.api import HubApi, ModelScopeConfig
|
||||
from modelscope.hub.constants import MODELSCOPE_SHOW_INDIVIDUAL_PROGRESS_THRESHOLD
|
||||
from modelscope.hub.constants import \
|
||||
MODELSCOPE_SHOW_INDIVIDUAL_PROGRESS_THRESHOLD
|
||||
from modelscope.hub.errors import InvalidParameter
|
||||
from modelscope.hub.file_download import (create_temporary_directory_and_cache,
|
||||
download_file, get_file_download_url)
|
||||
@@ -480,6 +481,9 @@ def _download_file_lists(
|
||||
raise InvalidParameter(
|
||||
f'Invalid repo type: {repo_type}, supported types: {REPO_TYPE_SUPPORT}'
|
||||
)
|
||||
disable_tqdm = len(
|
||||
filtered_repo_files
|
||||
) > MODELSCOPE_SHOW_INDIVIDUAL_PROGRESS_THRESHOLD # noqa
|
||||
download_file(
|
||||
url,
|
||||
repo_file,
|
||||
@@ -487,8 +491,7 @@ def _download_file_lists(
|
||||
cache,
|
||||
headers,
|
||||
cookies,
|
||||
disable_tqdm=len(filtered_repo_files) >
|
||||
MODELSCOPE_SHOW_INDIVIDUAL_PROGRESS_THRESHOLD,
|
||||
disable_tqdm=disable_tqdm,
|
||||
)
|
||||
|
||||
if len(filtered_repo_files) > 0:
|
||||
|
||||
Reference in New Issue
Block a user