7

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.

Tobias Kienzler
  • 23,665
  • 21
  • 122
  • 214
Thorin Schiffer
  • 2,720
  • 3
  • 24
  • 34
  • 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 Answers3

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
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