[Python-projects] Pylint error on wxPython code

Townsend, Richard Richard.Townsend at edl.uk.eds.com
Thu Apr 5 15:28:58 CEST 2007


Hi,

If I run pylint-0.13.1 on the following module:

test.py
#--------------------------------------------
import wx

def func(pos=wx.DefaultPosition):
    pass    
#--------------------------------------------

I get the following error:

************* Module test
C:  1: Missing docstring
C:  3:func: Missing docstring
Traceback (most recent call last):
  File "/opt/python/bin/pylint", line 4, in ?
    lint.Run(sys.argv[1:])
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
890, in __init__
    linter.check(args)
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
496, in check
    self.check_file(filepath, modname, checkers)
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
513, in check_file
    astng = self._check_file(filepath, modname, checkers)
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
537, in _check_file
    if not self.check_astng_module(astng, checkers):
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
598, in check_astng_module
    self.astng_events(astng, [checker for checker in checkers
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
616, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
616, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
  File "/opt/python/lib/python2.4/site-packages/pylint/lint.py", line
613, in astng_events
    checker.visit(astng)
  File "/opt/python/lib/python2.4/site-packages/logilab/astng/utils.py",
line 84, in visit
    method(node)
  File
"/opt/python/lib/python2.4/site-packages/pylint/checkers/base.py", line
367, in visit_function
    self._check_defaults(node)
  File
"/opt/python/lib/python2.4/site-packages/pylint/checkers/base.py", line
531, in _check_defaults
    value = default.infer().next()
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 300, in infer_getattr
    for obj in owner.igetattr(self.attrname, context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/__init__.py",
line 122, in _infer_stmts
    for infered in stmt.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/__init__.py",
line 122, in _infer_stmts
    for infered in stmt.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/__init__.py",
line 122, in _infer_stmts
    for infered in stmt.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 293, in infer_getattr
    for owner in self.expr.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/__init__.py",
line 122, in _infer_stmts
    for infered in stmt.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/__init__.py",
line 122, in _infer_stmts
    for infered in stmt.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 300, in infer_getattr
    for obj in owner.igetattr(self.attrname, context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/__init__.py",
line 122, in _infer_stmts
    for infered in stmt.infer(context):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 45, in wrapped
    for res in _func(node, context, **kwargs):
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/inference.py",
line 88, in infer_empty_node
    yield MANAGER.astng_from_something(self.object)
  File
"/opt/python/lib/python2.4/site-packages/logilab/astng/manager.py", line
197, in astng_from_something
    modname = klass.__module__
NameError: Unknown C global variable

This does not happen with pylint-0.12.2


I am using:
  Python 2.4
  wxWidgets 2.6.3
  Pylint 0.13.1
  astng 0.17.0
  common 0.21.2
  on Red Hat Linux.

Best regards,
Richard P Townsend

This email contains information which is confidential and may be
privileged. Unless you are the intended addressee (or authorised to
receive for the addressee) you may not use, forward, copy or disclose to
anyone this email or any information contained in this email. If you
have received this email in error, please advise the sender by reply
email immediately and delete this email.

EDS Defence Ltd
Registered Office: 4 Roundwood Avenue, Stockley Park, Uxbridge,
Middlesex, UB11 1BQ
Registered in England no: 936751
VAT number: 432 99 5915


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20070405/5a0571fb/attachment.html 


More information about the Python-Projects mailing list