[Python-projects] Possible PyLint bug with imported"new-style" classes?
Hiltz-Laforge, Jason
Jason.Hiltz-Laforge at cognos.com
Thu Feb 7 23:46:50 CET 2008
Hi Sylvain,
> This is much probably a python path bug. If you type "python" in the same place where you type "pylint", does "import base" works ?
D'oh! My mistake. It is indeed a path issue. I knew pylint wasn't going to be fooled by something so simple -- I just needed somebody to set me straight.
Merci beaucoup!
Cheers,
Jason
-----Original Message-----
From: syt at logilab.fr [mailto:syt at logilab.fr] On Behalf Of Sylvain Thénault
Sent: Thursday, February 07, 2008 4:06 AM
To: Hiltz-Laforge, Jason
Cc: python-projects at logilab.org
Subject: Re: [Python-projects] Possible PyLint bug with imported"new-style" classes?
On Wed, Feb 06, 2008 at 03:20:00PM -0500, Hiltz-Laforge, Jason wrote:
> Bonjour :-)
Bonjour,
> Thanks for all the hard work with PyLint. It's an excellent tool.
Thanks :)
> I've run into what may be a false positive for the E1101 (Instance of
> x has no y data member) and E1002 (Use super on an old style class) messages.
>
> Here's a trivial example:
>
> class Base(object):
>
> def __init__(self):
> super(Base, self).__init__()
>
> class Derived(Base):
>
> def __init__(self):
> super(Derived, self).__init__()
>
> Now, this lints with no issues if both classes are in the same python file.
>
> If I split it up into two files (say base.py and derived.py), and use
> "from base import Base" in the latter, PyLint reports an E1101 and
> E1002 error. This is using pylint 0.13.2, astng 0.17.1 and
> logilab-common 0.22.2. Have I goofed this up somehow or is it simply a bug?
this is much probably a python path bug. If you type "python" in the same place where you type "pylint", does "import base" works ?
--
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Python et calcul scientifique: http://www.logilab.fr/science
This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
More information about the Python-Projects
mailing list