] > Re: [Python-projects] [ANN] pylint 0.8.1 (Logilab.org)

Email Re: [Python-projects] [ANN] pylint 0.8.1

from
subject
Re: [Python-projects] [ANN] pylint 0.8.1
date
2005/11/08 09:25
On Monday 07 November à 18:25, Amaury Forgeot D Arc wrote:

> Bonjour Sylvain,

> Thanks for this new release!

> I already have some patches to the new version.
> (Actually, I kept them ready, but against an older version).

> I'm sorry I don't know how to produce a correct patch file, so I
> give here the lines that I modified.


> 1- "Unused imports" reports too many things, when using "import *".
>    I know I should not write code like this, but hey,
>    that's another warning...

>    in module checkers/variables.py, in leave_module():
>             ...
>             if isinstance(stmt, astng.Import) or (
>                 isinstance(stmt, astng.From) and stmt.modname != '
> __future__'
>                 and stmt.names[0][0] != '*'):
>                 self.add_message('W0611', args=name, node=stmt)
>             ...

hum, I'm not so keen on this one since it was imo encouraging people to
stop using this construct by showing how much things you were importing
without using it. I'll take a look at this and may be add an option to
get such a behaviour. Except maybe if there is a consensus here saying
that your proposed behaviour should replace the current one ?

> 2- Add the module name on Wildcard imports :
>    in module checkers/imports.py:
>     ...
>     'W0401': ('Wildcard import %r',
>     ....
>                 self.add_message('W0401', args=basename, node=node)
>     ...

ok
 
> 3- Correct the "relative import" warning:
>    the warning should occur only when absolute import gives a result
>    diffrerent than the relative import.

>    in logilab.common.modutils, in is_relative():

hum, sorry, this one is already fixed but I've not made the related
common release :(

> Also, I found that pressing Ctrl-C doesn't always quit pylint with a
> KeyboardInterrupt, but instead continues the program.
> I'll try to find if there is a bare "except:" statement which eats
> all exceptions... KeyboardInterrupt and SystemExit should not be
> caught.

yes, there are probably some bare "except:" or "except Exception:"
statements living in pylint or astng...

> Bravo again for your good tool,

:o)
Thank you for your patches and feedback !

-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org

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