目录层级
[root@00gcbjih-0oqrgn1nue .vscode]# tree
.
├── extensions.json
└── settings.json
extension.json
插件配置
[root@00gcbjih-0oqrgn1nue .vscode]# tree
.
├── extensions.json
└── settings.json
settings.json
格式化语法配置
{
// 默认用Pylance,可选: Jedi, Pylance
"python.languageServer": "Pylance",
// 需要python的版本大于3.7,建议python3.9
"[python]": {
// 对比yapf和black的格式化结果,black要规范些,且有vscode官方插件
// "editor.defaultFormatter": "eeyore.yapf"
"editor.defaultFormatter": "ms-python.black-formatter"
},
"black-formatter.args": ["--line-length", "100"],
"flake8.interpreter": ["/usr/bin/python3"],
"flake8.args": ["--max-line-length", "100"]
}
评论区