Salut Sylvain

On Mon, Feb 14, 2011 at 1:35 PM, Sylvain Thénault <
[email protected]> wrote:

> On 14 février 11:59, Arve Knudsen wrote:
> > Hi
>
> Hi,
>
> > I've found that pylint 0.23.0 will always issue a warning that a reimport
> > takes place when I import a module within a function, even if the module
> is
> > only imported in that one place. I've verified that pylint 0.21.0 on the
> > other hand does not issue any warning in this case. Is this valid new
> > behaviour in pylint, that importing within functions should be warned
> > against??
>
> if the module is only imported here, then it's a bug.
> I don't reproduce this on a simple case though.


Alright; I just installed the current pylint via pip (pip install pylint). I
pasted my example code into 'tst.py' and ran pylint on it:

-bash-3.00$ pylint tst.py
No config file found, using default configuration
************* Module tst
C:  1: Missing docstring
W:  3:reimport: Reimport 'os' (imported line 1)
W:  3:reimport: Unused variable 'os'


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

Reply via email to