How to disable pylint warnings and messages on Visual Studio Code?

31.5k views Asked by At

I am using a Mac and programming with Python on VS Code. After installing pylint, I had a bunch of warnings and messages. How do I disable these? I know about adding some lines to the pylintrc file, but I don't know where to find it or how to create it on a Mac.

2

There are 2 answers

4
Lescurel On BEST ANSWER

Fully disable the linting

Here is a link that explain how to do it : Disable Linting on VsCode.

To do so, type Command + Shift + P (or Ctrl + Shift + P on PC) in VsCode. This will open a command prompt at the top of the window. Then type the command Python: Enable Linting, and select off.

Another option is to choose no linter. To do so, open the command prompt with Command + Shift + P (or Ctrl + Shift + P on PC), type Python: Select Linter, and choose the option Disable Linting.


Disable warnings, but keep errors :

If you want to keep the errors, but disable only the warnings, you can also configure pylint directly from VsCode. Go to the menu File -> Preferences -> Settings (Or open directly with Command + , or Ctrl + ,). Then in the search box at the top of the window, search for pylint Args. Click on the button Add item and add the line --disable=W.

enter image description here

0
Tom Close On

I had disabled pylint in the settings but was still getting pylint linting showing up in my code, until I noticed there was a "pylint" vscode extension installed. Disabling that extension finally silenced pylint!