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?
This may be done by adding # pylint: disable=some-message,another-one at the desired block level or at the end of the desired line of code. 4.2 Is there a way to disable a message for a particular module only? You can disable messages by: numerical ID: E1101 , E1102 , etc.
If you want to disable specific warnings only, this can be done by adding a comment such as # pylint: disable=message-name to disable the specified message for the remainder of the file, or at least until # pylint: enable=message-name .
Disable linting You can easily toggle between enabling and disabling your linter. To switch, open the Command Palette (Ctrl+Shift+P) and select the Python: Enable/Disable Linting command. This will populate a dropdown with the current linting state and options to Enable or Disable Python linting.
Since I could not get the ignore by directory to work, I have resorted to simply putting # pylint: disable-msg-cat=WCREFI on top of each migration file, which ignores all Pylint errors, warnings, and information.
pylint --generate-rcfile > ~/.pylintrc
Then add "disable": "C0103"
to this file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With