[Python-projects] pylint: Problem with message suppression inside argument list
Sylvain Thénault
sylvain.thenault at logilab.fr
Fri Mar 27 10:02:12 CET 2009
Le Thursday 26 March 2009 19:37:38 Huurne, Maarten ter, vous avez écrit :
> Hi,
>
> In the following program, the message suppression has no effect:
> ===
> def f(
> k,
> # pylint: disable-msg=W0102
> d = {}
> ):
> return d.get(k)
> ===
> W0102: 1:f: Dangerous default value {} as argument
>
> However, if the "disable-msg" comment is moved to the start of the argument
> list or to the end of it, it does take effect. But if it is put on the same
> line as "d = {}", it has no effect.
>
> This is a regression in pylint 0.18.0 / astng 0.19.0 compared to pylint
> 0.16.0 / astng 0.17.4.
http://www.logilab.org/ticket/8776
thank you again for all those reports Maarten!
cheers,
--
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Python et calcul scientifique: http://www.logilab.fr/science
More information about the Python-Projects
mailing list