Email [Python-projects] Zope and pylint (again)

from
Marco Bizzarri <m.bizzarri at icube dot it>
subject
[Python-projects] Zope and pylint (again)
date
2005/06/15 09:37
Hi all.

We're a company developing Zope products, and we've started 
investigating the use of pylint to check our software.

While I find a great product, I've encountered some problems. I've seen 
some of them in past emails, but I was unable to find a solution.

1) double Products directory.

we have a multiple instance installation, with a central directory, 
located at /var/local/zope27/base/, and instance for each developer, at 
/var/local/zope27/<user>

Therefore, when we run pylint, we have two Products directories:

/var/local/zope27/base/lib/python/Products
and

/var/local/zope27/<user>/Products

I'm unable to convince pylint to import from both directories, using 
pylint 0.6; I've seen that there is a new version: does it solve this 
problem?

2) with a module, we have an exception:

Traceback (most recent call last):
  File "/usr/bin/pylint", line 4, in ?
    lint.Run(sys.argv[1:])
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
726, in __init__
    linter.check(args)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
406, in check
    self.check_file(filepath, modname, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
422, in check_file
    astng = self._check_file(filepath, modname, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
446, in _check_file
    self.check_astng_module(astng, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
493, in check_astng_module
    self.astng_events(astng, [checker for checker in checkers
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
510, in astng_events
    self.astng_events(child, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
510, in astng_events
    self.astng_events(child, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
510, in astng_events
    self.astng_events(child, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
510, in astng_events
    self.astng_events(child, checkers)
  File "/usr/lib/python2.3/site-packages/logilab/pylint/lint.py", line 
507, in astng_events
    checker.visit(astng)
  File "/usr/lib/python2.3/site-packages/logilab/common/astng/utils.py", 
line 94, in visit
    method(node)
  File 
"/usr/lib/python2.3/site-packages/logilab/pylint/checkers/classes.py", 
line 193, in visit_function
    self._check_init(node)
  File 
"/usr/lib/python2.3/site-packages/logilab/pylint/checkers/classes.py", 
line 365, in _check_init
    to_call, unresolved = self._ancestors_to_call(node, klass_node)
  File 
"/usr/lib/python2.3/site-packages/logilab/pylint/checkers/classes.py", 
line 445, in _ancestors_to_call
    baseastng.get_method(method)
AttributeError: Module instance has no attribute 'get_method'

I've seen also this in the mailing list, but it looks like it is not the 
case for us. Is it possible to enable some debugging?

Please, CC to me directly as I'm not (still) on the python-projects ML.

Oh yes, I almost forgot: thank you for providing pylint to the community :)

Regards
Marco
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects


has reply