mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +08:00
🎨 format code and bump dependency
This commit is contained in:
parent
9b79c83c3d
commit
00858416f9
@ -1,11 +1,11 @@
|
||||
const path = require("path");
|
||||
|
||||
module.exports = (context) => ({
|
||||
module.exports = context => ({
|
||||
base: process.env.VUEPRESS_BASE || "/",
|
||||
title: "NoneBot",
|
||||
description: "基于 酷Q 的 Python 异步 QQ 机器人框架",
|
||||
markdown: {
|
||||
lineNumbers: true,
|
||||
lineNumbers: true
|
||||
},
|
||||
/**
|
||||
* Extra tags to be injected to the page HTML `<head>`
|
||||
@ -21,26 +21,26 @@ module.exports = (context) => ({
|
||||
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
|
||||
[
|
||||
"meta",
|
||||
{ name: "apple-mobile-web-app-status-bar-style", content: "black" },
|
||||
{ name: "apple-mobile-web-app-status-bar-style", content: "black" }
|
||||
],
|
||||
[
|
||||
"link",
|
||||
{ rel: "apple-touch-icon", href: "/icons/apple-touch-icon-180x180.png" },
|
||||
{ rel: "apple-touch-icon", href: "/icons/apple-touch-icon-180x180.png" }
|
||||
],
|
||||
[
|
||||
"link",
|
||||
{
|
||||
rel: "mask-icon",
|
||||
href: "/icons/safari-pinned-tab.svg",
|
||||
color: "#ea5252",
|
||||
},
|
||||
color: "#ea5252"
|
||||
}
|
||||
],
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
name: "msapplication-TileImage",
|
||||
content: "/icons/mstile-150x150.png",
|
||||
},
|
||||
content: "/icons/mstile-150x150.png"
|
||||
}
|
||||
],
|
||||
["meta", { name: "msapplication-TileColor", content: "#ea5252" }],
|
||||
[
|
||||
@ -48,16 +48,16 @@ module.exports = (context) => ({
|
||||
{
|
||||
rel: "stylesheet",
|
||||
href:
|
||||
"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css",
|
||||
},
|
||||
],
|
||||
"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"
|
||||
}
|
||||
]
|
||||
],
|
||||
locales: {
|
||||
"/": {
|
||||
lang: "zh-CN",
|
||||
title: "NoneBot",
|
||||
description: "基于 酷Q 的 Python 异步 QQ 机器人框架",
|
||||
},
|
||||
description: "基于 酷Q 的 Python 异步 QQ 机器人框架"
|
||||
}
|
||||
},
|
||||
|
||||
theme: "nonebot",
|
||||
@ -83,7 +83,7 @@ module.exports = (context) => ({
|
||||
{ text: "进阶", link: "/advanced/" },
|
||||
{ text: "API", link: "/api/" },
|
||||
{ text: "插件广场", link: "/plugin-store" },
|
||||
{ text: "更新日志", link: "/changelog" },
|
||||
{ text: "更新日志", link: "/changelog" }
|
||||
],
|
||||
sidebarDepth: 2,
|
||||
sidebar: {
|
||||
@ -97,8 +97,8 @@ module.exports = (context) => ({
|
||||
"installation",
|
||||
"getting-started",
|
||||
"creating-a-project",
|
||||
"basic-configuration",
|
||||
],
|
||||
"basic-configuration"
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "编写插件",
|
||||
@ -109,15 +109,15 @@ module.exports = (context) => ({
|
||||
"creating-a-plugin",
|
||||
"creating-a-matcher",
|
||||
"creating-a-handler",
|
||||
"end-or-start",
|
||||
],
|
||||
"end-or-start"
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "协议适配",
|
||||
collapsable: false,
|
||||
sidebar: "auto",
|
||||
children: ["cqhttp-guide", "ding-guide", "mirai-guide"],
|
||||
},
|
||||
children: ["cqhttp-guide", "ding-guide", "mirai-guide"]
|
||||
}
|
||||
],
|
||||
"/advanced/": [
|
||||
{
|
||||
@ -130,15 +130,15 @@ module.exports = (context) => ({
|
||||
"permission",
|
||||
"runtime-hook",
|
||||
"export-and-require",
|
||||
"overloaded-handlers",
|
||||
],
|
||||
"overloaded-handlers"
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "发布",
|
||||
collapsable: false,
|
||||
sidebar: "auto",
|
||||
children: ["publish-plugin"],
|
||||
},
|
||||
children: ["publish-plugin"]
|
||||
}
|
||||
],
|
||||
"/api/": [
|
||||
{
|
||||
@ -148,78 +148,78 @@ module.exports = (context) => ({
|
||||
children: [
|
||||
{
|
||||
title: "nonebot 模块",
|
||||
path: "nonebot",
|
||||
path: "nonebot"
|
||||
},
|
||||
{
|
||||
title: "nonebot.config 模块",
|
||||
path: "config",
|
||||
path: "config"
|
||||
},
|
||||
{
|
||||
title: "nonebot.plugin 模块",
|
||||
path: "plugin",
|
||||
path: "plugin"
|
||||
},
|
||||
{
|
||||
title: "nonebot.message 模块",
|
||||
path: "message",
|
||||
path: "message"
|
||||
},
|
||||
{
|
||||
title: "nonebot.matcher 模块",
|
||||
path: "matcher",
|
||||
path: "matcher"
|
||||
},
|
||||
{
|
||||
title: "nonebot.rule 模块",
|
||||
path: "rule",
|
||||
path: "rule"
|
||||
},
|
||||
{
|
||||
title: "nonebot.permission 模块",
|
||||
path: "permission",
|
||||
path: "permission"
|
||||
},
|
||||
{
|
||||
title: "nonebot.log 模块",
|
||||
path: "log",
|
||||
path: "log"
|
||||
},
|
||||
{
|
||||
title: "nonebot.utils 模块",
|
||||
path: "utils",
|
||||
path: "utils"
|
||||
},
|
||||
{
|
||||
title: "nonebot.typing 模块",
|
||||
path: "typing",
|
||||
path: "typing"
|
||||
},
|
||||
{
|
||||
title: "nonebot.exception 模块",
|
||||
path: "exception",
|
||||
path: "exception"
|
||||
},
|
||||
{
|
||||
title: "nonebot.drivers 模块",
|
||||
path: "drivers/",
|
||||
path: "drivers/"
|
||||
},
|
||||
{
|
||||
title: "nonebot.drivers.fastapi 模块",
|
||||
path: "drivers/fastapi",
|
||||
path: "drivers/fastapi"
|
||||
},
|
||||
{
|
||||
title: "nonebot.adapters 模块",
|
||||
path: "adapters/",
|
||||
path: "adapters/"
|
||||
},
|
||||
{
|
||||
title: "nonebot.adapters.cqhttp 模块",
|
||||
path: "adapters/cqhttp",
|
||||
path: "adapters/cqhttp"
|
||||
},
|
||||
{
|
||||
title: "nonebot.adapters.ding 模块",
|
||||
path: "adapters/ding",
|
||||
path: "adapters/ding"
|
||||
},
|
||||
{
|
||||
title: "nonebot.adapters.mirai 模块",
|
||||
path: "adapters/mirai",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
path: "adapters/mirai"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
plugins: [
|
||||
@ -231,9 +231,9 @@ module.exports = (context) => ({
|
||||
serviceWorker: true,
|
||||
updatePopup: {
|
||||
message: "发现新内容",
|
||||
buttonText: "刷新",
|
||||
},
|
||||
},
|
||||
buttonText: "刷新"
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"versioning",
|
||||
@ -242,16 +242,16 @@ module.exports = (context) => ({
|
||||
pagesSourceDir: path.resolve(context.sourceDir, "..", "pages"),
|
||||
onNewVersion(version, versionDestPath) {
|
||||
console.log(`Created version ${version} in ${versionDestPath}`);
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"container",
|
||||
{
|
||||
type: "vue",
|
||||
before: '<pre class="vue-container"><code>',
|
||||
after: "</code></pre>",
|
||||
},
|
||||
],
|
||||
],
|
||||
after: "</code></pre>"
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
@ -62,7 +62,7 @@ class Driver(abc.ABC):
|
||||
:说明: 已连接的 Bot
|
||||
"""
|
||||
|
||||
def register_adapter(self, name: str, adapter: Type["Bot"], **kwargs):
|
||||
def register_adapter(self, name: str, adapter: Type["Bot"]):
|
||||
"""
|
||||
:说明:
|
||||
|
||||
@ -74,7 +74,7 @@ class Driver(abc.ABC):
|
||||
* ``adapter: Type[Bot]``: 适配器 Class
|
||||
"""
|
||||
self._adapters[name] = adapter
|
||||
adapter.register(self, self.config, **kwargs)
|
||||
adapter.register(self, self.config)
|
||||
logger.opt(
|
||||
colors=True).debug(f'Succeeded to load adapter "<y>{name}</y>"')
|
||||
|
||||
|
48
poetry.lock
generated
48
poetry.lock
generated
@ -143,7 +143,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "httpcore"
|
||||
version = "0.12.2"
|
||||
version = "0.12.3"
|
||||
description = "A minimal low-level HTTP client."
|
||||
category = "main"
|
||||
optional = false
|
||||
@ -228,7 +228,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "jinja2"
|
||||
version = "2.11.2"
|
||||
version = "2.11.3"
|
||||
description = "A very fast and expressive template engine."
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -280,7 +280,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "packaging"
|
||||
version = "20.8"
|
||||
version = "20.9"
|
||||
description = "Core utilities for Python packages"
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -334,7 +334,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "pygments"
|
||||
version = "2.7.3"
|
||||
version = "2.7.4"
|
||||
description = "Pygments is a syntax highlighting package written in Python."
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -347,7 +347,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "pygtrie"
|
||||
version = "2.4.1"
|
||||
version = "2.4.2"
|
||||
description = "A pure Python trie data structure implementation."
|
||||
category = "main"
|
||||
optional = false
|
||||
@ -457,8 +457,8 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "snowballstemmer"
|
||||
version = "2.0.0"
|
||||
description = "This package provides 26 stemmers for 25 languages generated from Snowball algorithms."
|
||||
version = "2.1.0"
|
||||
description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
@ -470,7 +470,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "sphinx"
|
||||
version = "3.4.1"
|
||||
version = "3.4.3"
|
||||
description = "Python documentation generator"
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -687,7 +687,7 @@ reference = "aliyun"
|
||||
|
||||
[[package]]
|
||||
name = "urllib3"
|
||||
version = "1.26.2"
|
||||
version = "1.26.3"
|
||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -828,8 +828,8 @@ html2text = [
|
||||
{file = "html2text-2020.1.16.tar.gz", hash = "sha256:e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb"},
|
||||
]
|
||||
httpcore = [
|
||||
{file = "httpcore-0.12.2-py3-none-any.whl", hash = "sha256:420700af11db658c782f7e8fda34f9dcd95e3ee93944dd97d78cb70247e0cd06"},
|
||||
{file = "httpcore-0.12.2.tar.gz", hash = "sha256:dd1d762d4f7c2702149d06be2597c35fb154c5eff9789a8c5823fbcf4d2978d6"},
|
||||
{file = "httpcore-0.12.3-py3-none-any.whl", hash = "sha256:93e822cd16c32016b414b789aeff4e855d0ccbfc51df563ee34d4dbadbb3bcdc"},
|
||||
{file = "httpcore-0.12.3.tar.gz", hash = "sha256:37ae835fb370049b2030c3290e12ed298bf1473c41bb72ca4aa78681eba9b7c9"},
|
||||
]
|
||||
httptools = [
|
||||
{file = "httptools-0.1.1-cp35-cp35m-macosx_10_13_x86_64.whl", hash = "sha256:a2719e1d7a84bb131c4f1e0cb79705034b48de6ae486eb5297a139d6a3296dce"},
|
||||
@ -858,8 +858,8 @@ imagesize = [
|
||||
{file = "imagesize-1.2.0.tar.gz", hash = "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"},
|
||||
]
|
||||
jinja2 = [
|
||||
{file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"},
|
||||
{file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"},
|
||||
{file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"},
|
||||
{file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"},
|
||||
]
|
||||
loguru = [
|
||||
{file = "loguru-0.5.3-py3-none-any.whl", hash = "sha256:f8087ac396b5ee5f67c963b495d615ebbceac2796379599820e324419d53667c"},
|
||||
@ -901,8 +901,8 @@ markupsafe = [
|
||||
{file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"},
|
||||
]
|
||||
packaging = [
|
||||
{file = "packaging-20.8-py2.py3-none-any.whl", hash = "sha256:24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858"},
|
||||
{file = "packaging-20.8.tar.gz", hash = "sha256:78598185a7008a470d64526a8059de9aaa449238f280fc9eb6b13ba6c4109093"},
|
||||
{file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"},
|
||||
{file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"},
|
||||
]
|
||||
pydantic = [
|
||||
{file = "pydantic-1.7.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c59ea046aea25be14dc22d69c97bee629e6d48d2b2ecb724d7fe8806bf5f61cd"},
|
||||
@ -933,11 +933,11 @@ pydash = [
|
||||
{file = "pydash-4.9.2.tar.gz", hash = "sha256:11d8f3c92d92a004e042fdb226b10dba28f4e311546b0de89d983e91539d5e55"},
|
||||
]
|
||||
pygments = [
|
||||
{file = "Pygments-2.7.3-py3-none-any.whl", hash = "sha256:f275b6c0909e5dafd2d6269a656aa90fa58ebf4a74f8fcf9053195d226b24a08"},
|
||||
{file = "Pygments-2.7.3.tar.gz", hash = "sha256:ccf3acacf3782cbed4a989426012f1c535c9a90d3a7fc3f16d231b9372d2b716"},
|
||||
{file = "Pygments-2.7.4-py3-none-any.whl", hash = "sha256:bc9591213a8f0e0ca1a5e68a479b4887fdc3e75d0774e5c71c31920c427de435"},
|
||||
{file = "Pygments-2.7.4.tar.gz", hash = "sha256:df49d09b498e83c1a73128295860250b0b7edd4c723a32e9bc0d295c7c2ec337"},
|
||||
]
|
||||
pygtrie = [
|
||||
{file = "pygtrie-2.4.1.tar.gz", hash = "sha256:4367b87d92eaf475107421dce0295a9d4d72156702908c96c430a426b654aee7"},
|
||||
{file = "pygtrie-2.4.2.tar.gz", hash = "sha256:43205559d28863358dbbf25045029f58e2ab357317a59b11f11ade278ac64692"},
|
||||
]
|
||||
pyparsing = [
|
||||
{file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
|
||||
@ -964,12 +964,12 @@ sniffio = [
|
||||
{file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"},
|
||||
]
|
||||
snowballstemmer = [
|
||||
{file = "snowballstemmer-2.0.0-py2.py3-none-any.whl", hash = "sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0"},
|
||||
{file = "snowballstemmer-2.0.0.tar.gz", hash = "sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52"},
|
||||
{file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"},
|
||||
{file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"},
|
||||
]
|
||||
sphinx = [
|
||||
{file = "Sphinx-3.4.1-py3-none-any.whl", hash = "sha256:aeef652b14629431c82d3fe994ce39ead65b3fe87cf41b9a3714168ff8b83376"},
|
||||
{file = "Sphinx-3.4.1.tar.gz", hash = "sha256:e450cb205ff8924611085183bf1353da26802ae73d9251a8fcdf220a8f8712ef"},
|
||||
{file = "Sphinx-3.4.3-py3-none-any.whl", hash = "sha256:c314c857e7cd47c856d2c5adff514ac2e6495f8b8e0f886a8a37e9305dfea0d8"},
|
||||
{file = "Sphinx-3.4.3.tar.gz", hash = "sha256:41cad293f954f7d37f803d97eb184158cfd90f51195131e94875bc07cd08b93c"},
|
||||
]
|
||||
sphinx-markdown-builder = []
|
||||
sphinxcontrib-applehelp = [
|
||||
@ -1012,8 +1012,8 @@ untokenize = [
|
||||
{file = "untokenize-0.1.1.tar.gz", hash = "md5:50d325dff09208c624cc603fad33bb0d"},
|
||||
]
|
||||
urllib3 = [
|
||||
{file = "urllib3-1.26.2-py2.py3-none-any.whl", hash = "sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473"},
|
||||
{file = "urllib3-1.26.2.tar.gz", hash = "sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08"},
|
||||
{file = "urllib3-1.26.3-py2.py3-none-any.whl", hash = "sha256:1b465e494e3e0d8939b50680403e3aedaa2bc434b7d5af64dfd3c958d7f5ae80"},
|
||||
{file = "urllib3-1.26.3.tar.gz", hash = "sha256:de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73"},
|
||||
]
|
||||
uvicorn = [
|
||||
{file = "uvicorn-0.11.8-py3-none-any.whl", hash = "sha256:4b70ddb4c1946e39db9f3082d53e323dfd50634b95fd83625d778729ef1730ef"},
|
||||
|
@ -29,8 +29,8 @@ loguru = "^0.5.1"
|
||||
pygtrie = "^2.4.1"
|
||||
fastapi = "^0.63.0"
|
||||
uvicorn = "^0.11.5"
|
||||
pydantic = {extras = ["dotenv", "typing_extensions"], version = "^1.7.3"}
|
||||
websockets = "^8.1"
|
||||
pydantic = {extras = ["dotenv", "typing_extensions"], version = "^1.7.3"}
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
yapf = "^0.30.0"
|
||||
|
Loading…
Reference in New Issue
Block a user