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