Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pylint ignore specific names [duplicate]

Tags:

python

pylint

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.

like image 255
eviltnan Avatar asked Jan 09 '13 11:01

eviltnan


2 Answers

There's good-names=YYY for this, or for some advanced stuff you can modify the regex via variable-rgx.

like image 94
Tobias Kienzler Avatar answered Oct 22 '22 00:10

Tobias Kienzler


According to the docs you enable and disable messages using lines like:

# pylint: disable=W0631

in the python code.

like image 5
f p Avatar answered Oct 22 '22 01:10

f p