mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-10 22:30:02 +08:00
🚨 Make pyright happy (#1840)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user