标题
安装 Black Formatter 插件
打开settings json 文件:
{
"python.formatting.provider": "none",
"python.formatting.autopep8Args": [
"--max-line-length=150"
],
"editor.wordWrap": "on",
"editor.wordWrapColumn": 150,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
},
"black-formatter.args": [
"--line-length",
"150"
],
}