pythonsublimetext3pylintpylintrc

Pylint errors-only in text editor


I'm using pylint with Sublime Text. I can get pylint to ignore certain warnings by putting the following at the top of the file.

# pylint: disable = some-option, another-option, a-third-option

I want pylint to disable all warnings in a file, not just the ones I specify. I understand that through normal use of pylint, I can get this behavior by using some command-line arguments. However, I am not using pylint on the command-line - I want my text editor to recognize this.

I can get all warnings ignored by including the following in .pylintrc:

[IGNORE WARNINGS]

errors-only=yes

However, this ignores all the warnings in the whole project, not just an individual file, and I need to remember to remove it when I am working on the other files. Furthermore, putting pylint: disable = errors-only at the top of a file does not do anything as I would expect.


Solution

  • Put # pylint: disable=W,C,R at top of a file to disable Warning, Convention, and Refactoring for a file.