The Python extension for VS Code used to provide builtin support for tools like formatters and linters, including:
What's happening to the builtin support for these tools in the Python extension? How can I get integrated support for these tools in VS Code going forward?
Basically, see https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions. I'll try to summarize/quote.
As announced on April 2022, our team has been working towards breaking the tools support we offer in the Python extension for Visual Studio Code into separate extensions, with the intent of improving performance, stability and no longer requiring the tools to be installed in a Python environment – as they can be shipped alongside an extension. This also allows the extensions to be shipped separately from the Python one once a new version of their respective tool becomes available.
Those extensions include: ms-python.pylint, ms-python.flake8, ms-python.mypy-type-checker, ms-python.black-formatter, ms-python.autopep8, ms-python.isort, charliermarsh.ruff, matangover.mypy, eeyore.yapf.
Prompts, commands, and context menu items already started getting removed in the 2018.18.0 release- Ex. Remove old linter and formatter prompts and commands #21979 and Remove sort imports from command palette and context menu #22058. Lots of removals are in the iteration plan for the October 2023 release. Official VS Code Python docs for linting and for formatting look to have been updated already- at least partially, which is nice.
Settings related to linting and formatting features that are moving to their own extensions are accordingly being removed (here's the full list with migration instructions). That includes python.linting.enabled, python.formatting.provider, and a host of settings related to specific linters and formatters.
Not all the linters and formatters that were supported before have extensions yet. If you want to create a linter or formatter tool extension yourself, the Python Tools Extension Template will probably help. Or, you can take a look at the list of alternatives for deprecated settings, which includes trying another extension that supports multiple linters (Ex. charliermarsh.ruff), disabling extension auto-update and sticking with an older version of the Python extension / other extension that supports the tool you want to use, or writing a task to run the tool in the integrated terminal (you can also write custom problem matching).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With