[Python-projects] pylint reports false errors for wx module.

Carsten Koch Carsten.Koch at icem.com
Tue Aug 29 20:11:07 CEST 2006


The following program works just fine:

------------------------
import wx

class test(wx.Frame):
   def __init__(self):
      print wx.Platform

test()
------------------------
% python test_wx_platform.py
__WXGTK__
------------------------


but pylint reports the following errors:

C:  0: Missing docstring
C:  0: Missing required attribute "__revision__"
C:  3:test: Invalid name "test" (should match [A-Z_][a-zA-Z0-9]+$)
C:  3:test: Missing docstring
W:  4:test.__init__: __init__ method from base class 'Frame' is not called
E:  5:test.__init__: Module 'wx' has no 'Platform' member
R:  3:test: Too many public methods (259/20)

In particular, the message "Module 'wx' has no 'Platform' member"
is untrue. If it were true, the program would fail.
Am I right in assuming that this is a pylint bug?
How can I disable "Module 'x' has no 'y' member"
error messages for system modules?

The message "Too many public methods (259/20)" is not helpful.
I understand that pylint counts not only my humble __init__
method, but also the 258 public methods of wxPython's Frame
class. However, I have no control over the wx module and it
is not fair to punish me for its attributes.
Also, how am I supposed to create a multi-level class hierarchy
if I am not allowed to add a few public methods on every level?  ;-)
How can I disable all messages for system modules?


Thanks and Cheers,
Carsten.



More information about the Python-Projects mailing list