1
0
Fork 0

lint, give civitai client a name

This commit is contained in:
Sean Sube 2023-12-09 23:03:41 -06:00
parent ebb5a586ce
commit e052578a20
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,9 @@ CIVITAI_ROOT = "https://civitai.com/api/download/models/%s"
class CivitaiClient(BaseClient): class CivitaiClient(BaseClient):
name = "civitai"
protocol = "civitai://" protocol = "civitai://"
root: str root: str
token: Optional[str] token: Optional[str]

View File

@ -6,7 +6,6 @@ from ..utils import (
build_cache_paths, build_cache_paths,
download_progress, download_progress,
get_first_exists, get_first_exists,
remove_prefix,
) )
from .base import BaseClient from .base import BaseClient

View File

@ -1,7 +1,6 @@
from logging import getLogger from logging import getLogger
from typing import Optional from typing import Optional
from huggingface_hub import snapshot_download
from huggingface_hub.file_download import hf_hub_download from huggingface_hub.file_download import hf_hub_download
from ..utils import ConversionContext, remove_prefix from ..utils import ConversionContext, remove_prefix

View File

@ -384,7 +384,7 @@ def build_cache_paths(
if format is not None: if format is not None:
basename = path.basename(name) basename = path.basename(name)
_filename, ext = path.splitext(basename) _filename, ext = path.splitext(basename)
if ext is None or ext == '': if ext is None or ext == "":
name = f"{name}.{format}" name = f"{name}.{format}"
paths = [ paths = [