I'm very confused about how it automatically format code in VS Code.
Below is a very clean, brand new environment for using Python.
When I write a test.py and press Save, prompt me for this information in the lower right corner, but I have installed these globally.
I had read this Automatically reformat Python code in VS Code . However , I can't comment it.
My workspace `settings.json`
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
},
"python.defaultInterpreterPath": "C:\\Users\\admin\\anaconda3",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.lintOnSave": true,
"python.linting.pycodestyleEnabled": true,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "autopep8",
"python.languageServer": "Pylance",
"[python]": {
// "editor.defaultFormatter": "ms-python.python",
"editor.formatOnSave": true,
},
}
pylintet al. are installed, is that in the globalPATHvariable?