Search code examples
error-handlingpylint

How do I disable a Pylint specific error message globally?


I'm using Sublime Text editor with Pylint as a Python code parser. It works fine, BUT whenever I define a variable, I receive the following error message (C0103):

Error: invalid constant name.

I read in this topic that one solution could be adding a # pylint: disable-msg=C0103 to the source code, but this solution isn't enough for me because I have a lot of variable definitions and I don't want to polute my code with calls to Pylint. I need to disable error message C0103 for good, globally, in ALL my Python's source files. I must get rid of this message forever. How can I accomplish this?


Solution

  • In order for pylint to automatically pick up your rc file, it should be located at ~/.pylintrc. Otherwise you would need to pass the rc file as an argument on every invocation of pylint.