from
Sylvain Thénault <sylvain.thenault at logilab dot fr>
to
Alexandre Fayolle <alexandre.fayolle at logilab dot fr>
cc
Python-Projects <python-projects at lists dot logilab dot org>
subject
Re: [Python-projects] Ignore line/block
date
On Tuesday 12 July à 14:00, Alexandre Fayolle wrote:2005/07/18 12:24
> On Tue, Jul 12, 2005 at 01:47:54PM +0200, Neil Benn wrote:
> > Hello,
Hi,
> > Looking through the docs I can see that it is possible to
> > enable/disable messages for a module - however is it possible to
> > enable-disable message for a section of code. For example I have :
>
> It is currently not possible to do that, but you're not the first one to
> inquire about this (see for example
> http://lists.logilab.org/pipermail/python-projects/2005-June/000357.html
> for a short thread that occured last month), and it is planned for a
> future release of pylint.
>
> My personnal view on this is that pylint is not always right (and
> indeed, pylint does quite often raise false warnings). Putting a comment
> in the except block stating that this is a case where the exception is
> ignored on purpose and living with the warning, is fine.
I agree here, PyLint can't always be right about warning it issues, so
it's quite normal to still get some warnings when you consider your code
to be right and clear.
While such a functionality would be nice (ignore a warning for a section
of code), I'm not willing to add it until I find a clean way to do it.
<hint>In your case, you can avoid the warning by replacing "pass" with
"continue"</hint>
regards
--
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
