[Python-projects] Ticket #2473: invoking pylint on __init__.py

Steffen Siebert logilab at steffensiebert.de
Tue May 13 10:44:09 CEST 2008


Hi,

I'm seeing the effect of bug 2473 on Ubuntu 8.04 with PyLint 0.14.0. For 
me it's very annoying, because I'm using PyLint from PyDev in Eclipse, 
which displays lots of warnings in __init__.py, which in fact belong to 
other modules in the same package, but not to __init__.py.

Fortunatly I found a patch which fixes the problem for me. But I'm not 
sure that the fix doesn't break anything else.

Here is the patch:

siebert at steffen:/usr/lib/python2.5/site-packages/pylint$ diff 
lint.py.orig lint.py
534c534
<             if not modname.endswith('.__init__') and '__init__.py' in 
filepath:
---
 >             if not modname.endswith('__init__') and '__init__.py' in 
filepath:


More details on the PyDev issue are found here:

https://sourceforge.net/tracker/?func=detail&atid=577329&aid=1957009&group_id=85796

It would be great if the next PyLint release would fix this issue.

Ciao,
   Steffen


More information about the Python-Projects mailing list