💡 add docstrings

This commit is contained in:
yanyongyu
2022-01-22 15:23:07 +08:00
parent f9674da6ea
commit c4e204001e
22 changed files with 342 additions and 191 deletions

View File

@ -1,6 +1,10 @@
"""本模块定义了协议适配基类,各协议请继承以下基类。
使用 {ref}`nonebot.drivers.Driver.register_adapter` 注册适配器
使用 {ref}`nonebot.drivers.Driver.register_adapter` 注册适配器
FrontMatter:
sidebar_position: 0
description: nonebot.adapters 模块
"""
from typing import Iterable

View File

@ -1,3 +1,8 @@
"""
FrontMatter:
sidebar_position: 1
description: nonebot.adapters._adapter 模块
"""
import abc
from contextlib import asynccontextmanager
from typing import Any, Dict, AsyncGenerator

View File

@ -1,3 +1,8 @@
"""
FrontMatter:
sidebar_position: 2
description: nonebot.adapters._bot 模块
"""
import abc
import asyncio
from functools import partial

View File

@ -1,3 +1,8 @@
"""
FrontMatter:
sidebar_position: 3
description: nonebot.adapters._event 模块
"""
import abc
from pydantic import BaseModel

View File

@ -1,3 +1,8 @@
"""
FrontMatter:
sidebar_position: 4
description: nonebot.adapters._message 模块
"""
import abc
from copy import deepcopy
from dataclasses import field, asdict, dataclass

View File

@ -1,3 +1,8 @@
"""
FrontMatter:
sidebar_position: 5
description: nonebot.adapters._template 模块
"""
import inspect
import functools
from string import Formatter