🚨 Make pyright happy (#1840)

This commit is contained in:
BalconyJH
2025-01-27 03:40:50 +08:00
committed by GitHub
parent 40779e05e8
commit d6fd5f170a
7 changed files with 28 additions and 21 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import asyncio
from collections.abc import Callable
from dataclasses import field
from datetime import datetime, timedelta
import inspect
import time
@@ -32,9 +33,9 @@ from .normal_image import normal_image
class Goods(BaseModel):
name: str
"""商品名称"""
before_handle: list[Callable] = []
before_handle: list[Callable] = field(default_factory=list)
"""使用前函数"""
after_handle: list[Callable] = []
after_handle: list[Callable] = field(default_factory=list)
"""使用后函数"""
func: Callable | None = None
"""使用函数"""