1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 15:04:50 +08:00

Lint unused import (#5973)

* Lint unused import

* nit

* Remove unused imports

* revert fix_torch import

* nit
This commit is contained in:
Chenlei Hu
2024-12-09 14:24:39 -06:00
committed by GitHub
parent e2fafe0686
commit 0fd4e6c778
40 changed files with 39 additions and 75 deletions

View File

@@ -4,7 +4,7 @@ import os
import time
import mimetypes
import logging
from typing import Set, List, Dict, Tuple, Literal
from typing import Literal
from collections.abc import Collection
supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetensors', '.pkl', '.sft'}
@@ -133,7 +133,7 @@ def get_directory_by_type(type_name: str) -> str | None:
return get_input_directory()
return None
def filter_files_content_types(files: List[str], content_types: Literal["image", "video", "audio"]) -> List[str]:
def filter_files_content_types(files: list[str], content_types: Literal["image", "video", "audio"]) -> list[str]:
"""
Example:
files = os.listdir(folder_paths.get_input_directory())