I have a problem with pylint, i.e. sometimes it repeats the same message for some variable/class/module etc. and I can't find a workaround for that. What I want is to say pylint "don't check [message XXX|any message] for variable YYY in [this module|module "ZZZ"]" with some option or rcfile directive.
Asked
Active
Viewed 9,544 times
7
-
You can ignore all `pylint` checks for the specific variable via the `dummy-variables` configuration: stackoverflow.com/a/50118061/1814353 – luart May 01 '18 at 14:21
3 Answers
8
There's good-names=YYY for this, or for some advanced stuff you can modify the regex via variable-rgx.
Tobias Kienzler
- 23,665
- 21
- 122
- 214
4
According to the docs you enable and disable messages using lines like:
# pylint: disable=W0631
in the python code.
f p
- 3,105
- 1
- 26
- 34
-
I know this feature, but i meant something like this `# pylint: disable-msg=W0631 for variable foo` in the beginning of the file – Thorin Schiffer Jan 09 '13 at 11:26
-
-
1
3
What you are asking for is not supported in the current version of Pylint.
You may want to get in touch with the maintainers and propose them a feature request and an implementation.
gurney alex
- 12,461
- 4
- 40
- 55
-
Doesn't [`good-names`](http://docs.pylint.org/features.html#basic-checker) fit the bill quite well? – Tobias Kienzler Aug 02 '13 at 06:11