mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-07 04:26:45 +00:00
🎨 impove typing
This commit is contained in:
@ -12,10 +12,10 @@ from nonebot.log import logger
|
||||
from nonebot.config import Env, Config
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from nonebot.adapters import BaseBot as Bot
|
||||
from nonebot.adapters import Bot
|
||||
|
||||
|
||||
class BaseDriver(abc.ABC):
|
||||
class Driver(abc.ABC):
|
||||
"""
|
||||
Driver 基类。将后端框架封装,以满足适配器使用。
|
||||
"""
|
||||
@ -140,7 +140,7 @@ class BaseDriver(abc.ABC):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class BaseWebSocket(object):
|
||||
class WebSocket(object):
|
||||
"""WebSocket 连接封装,统一接口方便外部调用。"""
|
||||
|
||||
@abc.abstractmethod
|
||||
|
@ -23,7 +23,7 @@ from nonebot.typing import overrides
|
||||
from nonebot.config import Env, Config
|
||||
from nonebot.utils import DataclassEncoder
|
||||
from nonebot.exception import RequestDenied
|
||||
from nonebot.drivers import BaseDriver, BaseWebSocket
|
||||
from nonebot.drivers import Driver as BaseDriver, WebSocket as BaseWebSocket
|
||||
|
||||
|
||||
class Driver(BaseDriver):
|
||||
|
Reference in New Issue
Block a user