Package: pylint
Version: 0.9.0-3
Severity: normal
Hi,
testing the following python file makes pylint print a traceback:
# test-pylint.py:
import mimetypes
mimetypes.encodings_map['.bz2'] = 'x-bzip2'
$ pylint test-pylint.py
No config file found, using default configuration
************* Module test-pylint
C: 0: Invalid name "test-pylint" (should match
(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$)
W: 0: Missing docstring
W: 0: Missing required attribute "__revision__"
Traceback (most recent call last):
File "/usr/bin/pylint", line 4, in ?
lint.Run(sys.argv[1:])
File "/usr/lib/site-python/pylint/lint.py", line 773, in __init__
linter.check(args)
File "/usr/lib/site-python/pylint/lint.py", line 435, in check
self.check_file(filepath, modname, checkers)
File "/usr/lib/site-python/pylint/lint.py", line 449, in check_file
astng = self._check_file(filepath, modname, checkers)
File "/usr/lib/site-python/pylint/lint.py", line 473, in _check_file
self.check_astng_module(astng, checkers)
File "/usr/lib/site-python/pylint/lint.py", line 517, in check_astng_module
self.astng_events(astng, [checker for checker in checkers
File "/usr/lib/site-python/pylint/lint.py", line 534, in astng_events
self.astng_events(child, checkers, _reversed_checkers)
File "/usr/lib/site-python/pylint/lint.py", line 534, in astng_events
self.astng_events(child, checkers, _reversed_checkers)
File "/usr/lib/site-python/pylint/lint.py", line 534, in astng_events
self.astng_events(child, checkers, _reversed_checkers)
File "/usr/lib/site-python/pylint/lint.py", line 534, in astng_events
self.astng_events(child, checkers, _reversed_checkers)
File "/usr/lib/site-python/pylint/lint.py", line 536, in astng_events
checker.leave(astng)
File "/usr/lib/site-python/logilab/astng/utils.py", line 92, in leave
method(node)
File "/usr/lib/site-python/pylint/checkers/variables.py", line 333, in
leave_getattr
[node.attrname])
File "/usr/lib/site-python/pylint/checkers/variables.py", line 351, in
_check_module_attrs
module = module.getattr(name)[0].infer().next()
File "/usr/lib/site-python/logilab/astng/inference.py", line 63, in wrapped
for res in _func(node, name, path, **kwargs):
File "/usr/lib/site-python/logilab/astng/inference.py", line 251, in
infer_global
yield self.root().resolve(name)
File "/usr/lib/site-python/logilab/astng/nodes.py", line 273, in resolve
frame, stmts = self.lookup_name(name)
File "/usr/lib/site-python/logilab/astng/nodes.py", line 227, in lookup_name
assert ID_RGX.match(name), '%r is not a valid identifier' % name
TypeError: expected string or buffer
It turns out that the name variable in the assert of astng/nodes.py:227
is None. So this might be a bug in logilab.astng. But I am not sure,
so I reported this against pylint.
Regards,
Bastian
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (900, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-treasure7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages pylint depends on:
ii emacsen-common 1.4.17 Common facilities for all emacsen
ii python 2.3.5-5 An interactive high-level object-o
ii python-logilab-astng 0.14.0-2 extend python's abstract syntax tr
ii python-logilab-common 0.13.1-3 useful miscellaneous modules used
ii python-tk 2.3.5-5 Tkinter - Writing Tk applications
pylint recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]