pylint reports _ as not callable

pylint, python

Solution

Disabling the message in your pylintrc file to avoid a false-positive is definitly not a solution as it will totally deactivate this check.

Taking a look at django's source code, it seems like pylint doesn't like the `lazy()` stuff. Django people should probably read http://www.logilab.org/blogentry/78354 and start a django specific plugin, which could easily fix such problems.

Problem

Problem I have imported ugettext_lazy as _ but pylint complains that _ is not callable. Is there a way to ignore this error message? ``` from django.utils.translation import ugettext_lazy as _ ... class A(models.Model): name = models.CharField(max_length=255, verbose_name=_("Name")) ``` Answer It seems I've found half of answer. There is a way to ignore certain messages. ``` [MESSAGES CONTROL] disable=E1102[,<msg id>]+ ``` to get list of messages and ids: ``` shell> pylint --list-msgs ``` Why its only half of solution? Well no it does not report situations like this: ``` asdf = 5 asdf() ``` Maybe there is a way to specify error cause, but thats for another day :|. Thank you all.

Original source