On 13 septembre 09:07, A.T.Hofkamp wrote:
> Hello,

Hi,

> I found a false negative with pylint.
> The following code (iterable.py) is not recognized as incorrect:
> ----------------------
> class A(object):
>     pass
> 
> a = A()
> xs = []
> xs.extend(a)
> ----------------------
> Python execution results in
> 
> Traceback (most recent call last):
>   File "iterable.py", line 6, in <module>
>     xs.extend(a)
> TypeError: 'A' object is not iterable
> 
> Pylint says:
> ************* Module iterable
> C:  1: Missing docstring
> C:  1:A: Invalid name "A" (should match [A-Z_][a-zA-Z0-9]+$)
> C:  1:A: Missing docstring
> R:  1:A: Too few public methods (0/2)
> 
> pylint 0.18.1,
> astng 0.19.1, common 0.45.1
> Python 2.5.4 (r254:67916, Nov 30 2009, 21:04:24)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
> 
> I have also tried with a newer pylint. Unfortunately, I do not have
> the precise output any more, but also that version does not report
> an error, only warnings and recommendations.

Indeed, this is not a pylint feature yet. You can stil file a ticket
so it may becomes one at some point.
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

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

Reply via email to