🐛 fix event maybe converted when checking type (#876)

Fix: 修复 event 类型检查会对类型进行自动转换
This commit is contained in:
Ju4tCode
2022-03-20 19:40:43 +08:00
committed by GitHub
parent fcdb05a7e2
commit 45e2e6c280
6 changed files with 53 additions and 20 deletions

View File

@ -1,5 +1,13 @@
from nonebot.adapters import Bot
async def get_bot(b: Bot):
async def get_bot(b: Bot) -> Bot:
return b
class SubBot(Bot):
...
async def sub_bot(b: SubBot) -> SubBot:
return b