Fix typo and unused imports (#1196)

* fix file exists of sub folder

* fix code doc

* add ci

* lint code

* fix unused imports and typo
This commit is contained in:
tastelikefeet
2025-01-18 10:22:22 +08:00
committed by GitHub
parent b892164d11
commit b1404cdc2e

View File

@@ -1,24 +1,8 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import os
import shutil
import tempfile
import unittest
import uuid
from os.path import expanduser
from requests import delete
from modelscope.hub.api import HubApi
from modelscope.hub.constants import Licenses, ModelVisibility
from modelscope.hub.errors import NotExistError
from modelscope.hub.file_download import model_file_download
from modelscope.hub.git import GitCommandWrapper
from modelscope.hub.repository import Repository
from modelscope.utils.constant import ModelFile
from modelscope.utils.logger import get_logger
from modelscope.utils.test_utils import (TEST_ACCESS_TOKEN1,
TEST_MODEL_CHINESE_NAME,
TEST_MODEL_ORG, delete_credential)
logger = get_logger()
logger.setLevel('DEBUG')
@@ -28,7 +12,7 @@ download_model_file_name = 'test.bin'
class FileExistsTest(unittest.TestCase):
def test_file_exsists(self):
def test_file_exists(self):
api = HubApi()
self.assertTrue(
api.file_exists('iic/gte_Qwen2-7B-instruct', 'added_tokens.json'))