🔖 PreRelease 2.0.0a7

This commit is contained in:
yanyongyu
2020-12-05 01:22:28 +08:00
parent d7a4593fcf
commit 5ebe7ff1cb
44 changed files with 2386 additions and 869 deletions

View File

@ -0,0 +1,60 @@
---
contentSidebar: true
sidebarDepth: 0
---
# NoneBot.utils 模块
## `escape_tag(s)`
* **说明**
用于记录带颜色日志时转义 `<tag>` 类型特殊标签
* **参数**
* `s: str`: 需要转义的字符串
* **返回**
* `str`
## `run_sync(func)`
* **说明**
一个用于包装 sync function 为 async function 的装饰器
* **参数**
* `func: Callable[..., Any]`: 被装饰的同步函数
* **返回**
* `Callable[..., Awaitable[Any]]`
## _class_ `DataclassEncoder`
* **说明**
在JSON序列化 `Message` (List[Dataclass]) 时使用的 `JSONEncoder`