diff --git a/webp_to_png/tools.py b/webp_to_png/tools.py index 5f8b19c..b20ef8c 100644 --- a/webp_to_png/tools.py +++ b/webp_to_png/tools.py @@ -1,6 +1,7 @@ import os +from typing import Any from PIL import Image -def convert_webp_to_png(webp_dir:str, png_dir:str,window)->None: +def convert_webp_to_png(webp_dir:str, png_dir:str,window:Any)->None: # 获取目录中以.webp结尾的文件列表 webp_files = [f for f in os.listdir(webp_dir) if f.endswith('.webp')] # 获取文件总数