skip to Main Content

I just installed the latest version (1.83.1) of VSC on Ubuntu. I plan to develop in Python, and am just getting started using Linters.

I have installed the VSC extensions for Python, including the Pylance extension. I also installed the pylint and flake8 extensions as I wanted to compare the two linters.

All documentation I’ve seen, including that on Microsoft’s web site, is that I should be able to select which linter to use by entering the command (ctrl-shft-p) "python: select linter". However that command does not does not appear in the command list.

Both linter extensions are enabled, and both appear to work, as I get pop up messages with lint corrections.

Has there been a change in the linter selection that does not appear in the documentation?

2

Answers


  1. You can use ctrl-shift-p and look for "preferences:Open user settings" and look for setting "@id:editor.defaultFormatter @lang:python python" in the "search settings" bar. There, you can pick your preferred linter from the dropdown.

    Login or Signup to reply.
  2. The Python: Select Linter command was removed in the 2023.18.0 release / between that release and the 2023.16.0 release. You can see the command definition and the command palette menu item definition still there in the 2023.16.0 release’s extension manifest (search "setLinter"), whereas it’s gone in the 2023.18.0 extension manifest.

    For more info on why this change (probably) happened, see Why does the VS Code Python extension (circa v2018.19) no longer provide support for several Python tools like linters and formatters?. TL;DR the Python extension is deferring linting to separate extensions now.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search