想在Visual Studio Code中使用autosave,应用flake8、mypy、isort、black等常用工具
Flake8、mypy 和 black 工作正常,但 isort 根本不起作用。 有办法解决这个问题吗?
我的 settings.json 文件如下所示:
{
"python.terminal.activateEnvInCurrentTerminal": false,
"python.defaultInterpreterPath": "${workspaceFolder}\\.venv\\Scripts\\python.exe",
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Path": "${workspaceFolder}\\.venv\\Scripts\\pflake8.exe",
"python.linting.mypyEnabled": true,
"python.formatting.provider": "black",
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true
}
}