Skip to content

Commit a9c87bf

Browse files
committed
chore: 更新vscode编辑与调试配置
1 parent a01dd0a commit a9c87bf

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.vscode/launch.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
{
2-
// 使用 IntelliSense 了解相关属性。
3-
// 悬停以查看现有属性的描述。
4-
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
85
"name": "Python: Nonebot",
9-
"type": "python",
6+
"type": "debugpy",
107
"request": "launch",
118
"program": "${workspaceFolder}/bot.py",
129
"console": "integratedTerminal",

.vscode/settings.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"python.formatting.provider": "autopep8"
2+
"[python]": {
3+
"diffEditor.ignoreTrimWhitespace": false,
4+
"editor.defaultFormatter": "ms-python.autopep8",
5+
"editor.formatOnType": true,
6+
"editor.formatOnSave": true
7+
},
8+
"python.languageServer": "Pylance",
9+
"python.analysis.typeCheckingMode": "basic"
310
}

bot.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import nonebot
2+
from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11Adapter
3+
4+
5+
6+
nonebot.init()
7+
8+
driver = nonebot.get_driver()
9+
driver.register_adapter(ONEBOT_V11Adapter)
10+
11+
12+
nonebot.load_from_toml("pyproject.toml")
13+
14+
if __name__ == "__main__":
15+
nonebot.run()

0 commit comments

Comments
 (0)