mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 12:06:45 +00:00
🐛 fix event maybe converted when checking type (#876)
Fix: 修复 event 类型检查会对类型进行自动转换
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user