🐛 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

@ -6,6 +6,14 @@ async def event(e: Event) -> Event:
return e
class SubEvent(Event):
...
async def sub_event(e: SubEvent) -> SubEvent:
return e
async def event_type(t: str = EventType()) -> str:
return t