6

I have a workspace setup in VS Code where I do python development. I have linting enabled, pylint enabled as the provider, and lint on save enabled, but I continue to see no errors in the Problems panel. When I run pylint via the command line in the virtual environment i see a bunch of issues - so I know pylint works. I am also using black formatting(on save) which works without issue. I have tried using both the default pylint path as well as updating it manually to the exact location and still no results. When I look at the Output panel for python it looks like pylint is never even running (i.e. I see the commands for black running there but nothing for pylint).

My pylint version is 2.4.4 and VS Code version 1.46

Any idea how to get this working?

matthewmturner
  • 566
  • 7
  • 21
  • For anyone still experiancing this. If you're using the vscode pylint add-in, Id' recommend switching to the `output` window and selecting `Pylint` from the dropdown. In the past I've had all sorts of errors such as using `True` rather than `true` in my `pyproject.toml` which caused pylint to log an error and terminate. – David Waterworth May 16 '23 at 23:49

3 Answers3

1

Add

"python.linting.enabled" : true
"python.linting.lintOnSave" : true

to your settings.json

null
  • 169
  • 1
  • 13
tHeSiD
  • 4,587
  • 4
  • 29
  • 49
  • 1
    They are already enabled in my preferences at the user, workspace, and folder level. Why would it make a difference if i do it in the preferences vs settings.json? – matthewmturner Jun 15 '20 at 23:13
1

This is due to a bug in the newer version of python extension see here.

For now you can either wait for the fix to arrive, use jedi language server or install previous version of the extension

-2
  1. Uninstall Python Extension
  2. Reinstall Python Extension
  3. And with that there will will be one more extension of "Python Extension" named - "PYLANCE" don't forget to install that too.
  4. Reload VS Code

DONE !!