[Python-projects] Fwd: pylint and ignore specific occurrence of a warning

Sylvain Thénault thenault at gmail.com
Mon Jan 15 21:29:38 CET 2007


Forwarded Conversation
Subject: pylint and ignore specific occurrence of a warning
------------------------

 From: Jeff Hinrichs - DM&T <dundeemt at gmail.com>
Reply-To: tech at dundeemt.com
To: thenault at gmail.com
Date: Sun, Jan 14, 2007 at 7:02 PM

I was wondering if it is possible to tell pylint to ignore a warning
for a specific line?  For example, too many public methods in a case
like

class foo:
  """base has lots of public methods but doesn't create a warning"""
  ...

class bar(foo):  #IGNORE:R0904
  """this would push # of methods over warning limit"""
  def some_method(self):
    pass
  ...

Would be helpful to quiet output for a specific instance of a
warning/error but not kill it for other useful findings of a similiar
problem in other parts of the code.  Other examples would be wanting
to flag missing __init__ methods except for a couple of exceptions.


Thanks,

Jeff
--
Jeff Hinrichs
Dundee Media & Technology, Inc
jeffh at dundeemt.com
402.320.0821

--------
 From: Jeff Hinrichs - DM&T <dundeemt at gmail.com>
Reply-To: tech at dundeemt.com
To: thenault at gmail.com
Date: Sun, Jan 14, 2007 at 8:39 PM

After another round of googling I found that this was possible with:
 #pylint: disable-msg=id[,id2]

Not sure how I missed it in the docs or on-iine help.  Is it there and
I just missed it?

Thanks again for a great tool.

-Jeff
[Quoted text hidden]
--------


More information about the Python-Projects mailing list