On 12 septembre 14:22, Jaakko Salli wrote:
> 
> Hi all,

Hi,
 
> First of all, thanks for this great tool - it has detected many
> serious bugs in my Python code.
> 
> Now to the issue at hand: Running pylint 0.18.1 (with Python 2.5.4,
> logilab_astng-0.19.1 and logilab_common-0.44.0) for the attached
> test.py generates following error (E1101 I believe):
> 
> E: 37:DataManager.TestFunc: Instance of 'DataManager' has no 'project' member
> 
> This message is generated for the last line of the following
> snippet:
> 
> class DataManager(object):
>     def __init__(self):
>       self.app = get_active_application()
> 
>     def TestFunc(self):
>         app = self.app
>         print app.project
> 
> As you can see, it incorrectly reports app as DataManager
> instance (it is be Application instance instead - see the attached
> file). Also, Application class in fact has a 'project' member
> variable.
> 
> Code itself has commented-out demonstration how to work around
> this error message - essentially it comprises of not using global
> function to acquire the Application instance.

filed as http://www.logilab.org/ticket/18773 

Thank you for reporting this!

-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

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

Reply via email to