mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 04:46:25 +08:00
💡 add driver docstring
This commit is contained in:
parent
e58174f6ec
commit
b4e0034876
@ -1,5 +1,11 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
后端驱动适配基类
|
||||||
|
===============
|
||||||
|
|
||||||
|
各驱动请继承以下基类
|
||||||
|
"""
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
@ -9,7 +15,15 @@ from nonebot.typing import Bot, Dict, Type, Union, Optional, Callable
|
|||||||
|
|
||||||
|
|
||||||
class BaseDriver(abc.ABC):
|
class BaseDriver(abc.ABC):
|
||||||
|
"""
|
||||||
|
Driver 基类。将后端框架封装,以满足适配器使用。
|
||||||
|
"""
|
||||||
|
|
||||||
_adapters: Dict[str, Type[Bot]] = {}
|
_adapters: Dict[str, Type[Bot]] = {}
|
||||||
|
"""
|
||||||
|
:类型: ``Dict[str, Type[Bot]]``
|
||||||
|
:说明: 已注册的适配器列表
|
||||||
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def __init__(self, env: Env, config: Config):
|
def __init__(self, env: Env, config: Config):
|
||||||
|
Loading…
Reference in New Issue
Block a user