🚨 remove linter error

This commit is contained in:
yanyongyu
2021-06-16 00:58:47 +08:00
parent 8849cb73bb
commit 6749afe75e
4 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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: