🚨 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
+4 -3
View File
@@ -1,4 +1,5 @@
from collections.abc import Callable
from dataclasses import field
from nonebot.adapters.onebot.v11 import Message, MessageSegment
from nonebot.plugin import require
@@ -8,8 +9,8 @@ from zhenxun.models.goods_info import GoodsInfo
class Goods(BaseModel):
before_handle: list[Callable] = []
after_handle: list[Callable] = []
before_handle: list[Callable] = field(default_factory=list)
after_handle: list[Callable] = field(default_factory=list)
price: int
des: str = ""
discount: float
@@ -19,7 +20,7 @@ class Goods(BaseModel):
is_passive: bool
partition: str | None
func: Callable
kwargs: dict[str, str] = {}
kwargs: dict[str, str] = field(default_factory=dict)
send_success_msg: bool
max_num_limit: int