3
votes

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?

3

3 Answers

1
votes

Add

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

to your settings.json

0
votes

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

0
votes
  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 !!