🎨 impove typing

This commit is contained in:
yanyongyu
2020-12-07 00:06:09 +08:00
parent 629eed08b6
commit 6b3f6a46e6
27 changed files with 60 additions and 137 deletions

View File

@ -1,9 +1,10 @@
from nonebot.typing import Bot, Event
from nonebot.typing import State
from nonebot.adapters import Bot, Event
from . import match
async def heartbeat(bot: Bot, event: Event, state: dict) -> bool:
async def heartbeat(bot: Bot, event: Event, state: State) -> bool:
return event.detail_type == "heartbeat"
@ -11,5 +12,5 @@ test = match.on_metaevent(rule=heartbeat)
@test.receive()
async def handle_heartbeat(bot: Bot, event: Event, state: dict):
async def handle_heartbeat(bot: Bot, event: Event, state: State):
print("[i] Heartbeat")