🎨 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,14 +1,15 @@
import asyncio
from nonebot import on_message
from nonebot.typing import State
from nonebot.permission import USER
from nonebot.typing import Bot, Event
from nonebot.adapters import Bot, Event
a = on_message(priority=0, permission=USER(123123123), temp=True)
@a.handle()
async def test_a(bot: Bot, event: Event, state: dict):
async def test_a(bot: Bot, event: Event, state: State):
print("======== A Received ========")
print("======== A Running Completed ========")
@ -17,7 +18,7 @@ b = on_message(priority=0, permission=USER(123456789), temp=True)
@b.handle()
async def test_b(bot: Bot, event: Event, state: dict):
async def test_b(bot: Bot, event: Event, state: State):
print("======== B Received ========")
await asyncio.sleep(10)
print("======== B Running Completed ========")
@ -27,5 +28,5 @@ c = on_message(priority=0, permission=USER(1111111111))
@c.handle()
async def test_c(bot: Bot, event: Event, state: dict):
async def test_c(bot: Bot, event: Event, state: State):
print("======== C Received ========")