On 11/12/2010 09:54 AM, Sylvain Thénault wrote:
On 10 novembre 12:50, Naty Bidart wrote:
Hello list!
...
and in both ubuntuone/__init__.py we have the exact same content:

__import__('pkg_resources').declare_namespace(__name__)

The pb is that pylint doesn't understand that yet... Nor direct __path__
manipulation.

I think you can get it working by using --init-hook option to get
ubuntuone package imported so its path is properly set, eg:

   pylint --init-hook="import ubuntuone" ...

or something similar.

Hi Sylvian,


Thanks for your answer. Even using the --init-hook swicth I can not make pylint notice the ubuntuone modules, as I can show you here:

ness...@dali:~/canonical/u1/cp/trunk$ pylint --init-hook="import ubuntuone" ubuntuone/controlpanel/dbus_client.py

************* Module ubuntuone.controlpanel.dbus_client
F0401: 27: Unable to import 'ubuntuone.clientdefs'
E0611: 27: No name 'clientdefs' in module 'ubuntuone'
F0401: 28: Unable to import 'ubuntuone.platform.linux'
E0611: 28: No name 'platform' in module 'ubuntuone'
F0401: 29: Unable to import 'ubuntuone.platform.linux.tools'
E0611: 29: No name 'platform' in module 'ubuntuone'

ness...@dali:~/canonical/u1/cp/devices$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ubuntuone.clientdefs
>>> import ubuntuone.platform.linux
>>> import ubuntuone.platform.linux.tools
>>>

May I ask why the patch submitted in http://www.logilab.org/ticket/8796 has not been merged or used?

Cheers, Natalia.
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to