mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	🚨 remove linter error
This commit is contained in:
		| @@ -9,6 +9,7 @@ Quart 驱动适配 | ||||
| """ | ||||
|  | ||||
| import asyncio | ||||
| from dataclasses import dataclass | ||||
| from typing import List, TypeVar, Callable, Coroutine, Optional | ||||
|  | ||||
| import uvicorn | ||||
| @@ -231,6 +232,7 @@ class Driver(ReverseDriver): | ||||
|             self._bot_disconnect(bot) | ||||
|  | ||||
|  | ||||
| @dataclass | ||||
| class WebSocket(BaseWebSocket): | ||||
|     websocket: QuartWebSocket = None  # type: ignore | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ _running_matcher: Dict[str, int] = {} | ||||
|  | ||||
|  | ||||
| @run_preprocessor | ||||
| async def _(matcher: Matcher, bot: Bot, event: Event, state: T_State): | ||||
| async def preprocess(matcher: Matcher, bot: Bot, event: Event, state: T_State): | ||||
|     try: | ||||
|         session_id = event.get_session_id() | ||||
|     except Exception: | ||||
| @@ -23,7 +23,8 @@ async def _(matcher: Matcher, bot: Bot, event: Event, state: T_State): | ||||
|  | ||||
|  | ||||
| @run_postprocessor | ||||
| async def _(matcher: Matcher, exception: Optional[Exception], bot: Bot, event: Event, state: T_State): | ||||
| async def postprocess(matcher: Matcher, exception: Optional[Exception], | ||||
|                       bot: Bot, event: Event, state: T_State): | ||||
|     try: | ||||
|         session_id = event.get_session_id() | ||||
|     except Exception: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user