refactor: 消除前端52处any类型+删除冗余requirements.txt+调试print改日志
- 删除 requirements.txt,pyproject.toml 为唯一依赖源(含 requests[socks] extra) - core/geetest 下 5 处 print() 替换为 loguru logger.debug() - api/modules.ts 新增 13 个响应接口,消除所有 api.xxx<any, any> - 新建 utils/error.ts 提供 getErrorMessage(e: unknown) 安全取消息 - 11 个页面组件 catch (e: any) 改为 catch (e: unknown) - useState<any[]>、columns: any[]、render 参数全部类型化 - TypeScript 类型检查零错误通过
This commit is contained in:
@@ -2,6 +2,7 @@ import requests
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from loguru import logger
|
||||
|
||||
REQUEST_TIMEOUT = (3.05, 12)
|
||||
|
||||
@@ -60,7 +61,7 @@ def restore_geetest_image(input_path:str, output_path:str) -> None:
|
||||
new_img.paste(l, box=(_ % 26 * 10, 80 if _ > 25 else 0))
|
||||
|
||||
new_img.save(output_path)
|
||||
print(f"图像已还原并保存到: {output_path}")
|
||||
logger.debug("图像已还原并保存到: {}", output_path)
|
||||
|
||||
# 下载图片
|
||||
def download_picture(bg:str, fullbg:str, slice:str) -> int:
|
||||
|
||||
Reference in New Issue
Block a user