David Warde-Farley | 2 Jun 2009 02:38
Picon
Favicon
Gravatar

Code-checkers & ETS packages

Hi,

I've noticed that pylint, in particular, has a lot of trouble with  
Traits and other Enthought packages (saw this with Chaco as well).

No config file found, using default configuration
************* Module new_tools
E: 14: No name 'traits' in module 'enthought'
F: 14: Unable to import 'enthought.traits.api' (No module named traits)
E: 15: No name 'traits' in module 'enthought'
F: 15: Unable to import 'enthought.traits.api' (No module named traits)
E: 16: No name 'traits' in module 'enthought'
F: 16: Unable to import 'enthought.traits.api' (No module named traits)
E: 23: No name 'traits' in module 'enthought'
F: 23: Unable to import 'enthought.traits.ui.api' (No module named  
traits)
E: 26: No name 'traits' in module 'enthought'
F: 26: Unable to import 'enthought.traits.ui.api' (No module named  
traits)

Importing with the same python interpreter works fine. Is there  
something broken in the top-level package enthought? I easy_install'd  
Traits not too long ago.

Any suggestions on other code-checking utilities would be helpful as  
well.

Regards,

David
(Continue reading)

Robert Kern | 2 Jun 2009 02:42
Gravatar

Re: Code-checkers & ETS packages

On Mon, Jun 1, 2009 at 19:38, David Warde-Farley <dwf@...> wrote:
> Hi,
>
> I've noticed that pylint, in particular, has a lot of trouble with
> Traits and other Enthought packages (saw this with Chaco as well).
>
> No config file found, using default configuration
> ************* Module new_tools
> E: 14: No name 'traits' in module 'enthought'
> F: 14: Unable to import 'enthought.traits.api' (No module named traits)
> E: 15: No name 'traits' in module 'enthought'
> F: 15: Unable to import 'enthought.traits.api' (No module named traits)
> E: 16: No name 'traits' in module 'enthought'
> F: 16: Unable to import 'enthought.traits.api' (No module named traits)
> E: 23: No name 'traits' in module 'enthought'
> F: 23: Unable to import 'enthought.traits.ui.api' (No module named
> traits)
> E: 26: No name 'traits' in module 'enthought'
> F: 26: Unable to import 'enthought.traits.ui.api' (No module named
> traits)
>
> Importing with the same python interpreter works fine. Is there
> something broken in the top-level package enthought?

No. I'm guessing that pylint doesn't know how to deal with namespace packages.

> I easy_install'd
> Traits not too long ago.
>
> Any suggestions on other code-checking utilities would be helpful as
(Continue reading)

David Warde-Farley | 2 Jun 2009 20:30
Picon
Favicon
Gravatar

Re: Code-checkers & ETS packages

On 1-Jun-09, at 8:42 PM, Robert Kern wrote:

> No. I'm guessing that pylint doesn't know how to deal with namespace  
> packages.

Looks like you're right: http://www.logilab.org/ticket/8796

> I use pyflakes compulsively. It doesn't do nearly as much as pylint,
> but it is so fast, I can do it on nearly every file-save.

Thanks, I'm giving it a try.

David

Gmane