[Python-projects] Bug in pylint ? Looks like pylint 0.14.0 can't detect mismatch in function arguments!

Pierre Rouleau prouleau001 at sympatico.ca
Sat Jul 5 23:21:20 CEST 2008


Hi.  I think I'v found a bug in Pylint 0.14.0

In the test file included below, Pylint 0.14.0 fails to report calls 
with invalid number of arguments!  I tried it on a directory with no 
rcfile just to be sure.  That's got to be a new bug, I'm sure I'v seen 
report of invalid number of arguments before with Pylint.

At first I ran it with logilab common 0.29.1.  Then I noticed that 
common 0.33.0 was available; I downloaded it and tried the test gain: no 
change.

This is got to be a *major* bug.  Am I missing something here? I am a 
little tired, having worked several nights to complete something at 
work.  But I was sure pylint was able to detect these mismatch 
before...  Somehow, now, pylint 0.14.0 accepts invalid calls...

Don't get me wrong.  I love pylint.  I use it all the time.  That's why 
I coul not beleive when I got a traceback on a function that was not 
passed the right number of arguments...  Anyway, if there is a switch I 
missed let me know. 

Thanks!


The test file is attached.

Pylints output follow:

D:\dvp\tools\testlang\python\invalid_code>pylint --version
No config file found, using default configuration
pylint.bat 0.14.0,
astng 0.17.2, common 0.29.1
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]


D:\dvp\tools\testlang\python\invalid_code>pylint test_01.py
No config file found, using default configuration


Report
======
11 statements analysed.

Duplication
-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |0     |0        |=          |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000    |=          |
+-------------------------+------+---------+-----------+



Raw metrics
-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |11     |47.83 |11       |=          |
+----------+-------+------+---------+-----------+
|docstring |9      |39.13 |9        |=          |
+----------+-------+------+---------+-----------+
|comment   |0      |0.00  |0        |=          |
+----------+-------+------+---------+-----------+
|empty     |3      |13.04 |3        |=          |
+----------+-------+------+---------+-----------+



Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |1      |1          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |0      |0          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |0      |0          |=          |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |3      |3          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+



Messages by category
--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |0      |0        |=          |
+-----------+-------+---------+-----------+
|refactor   |0      |0        |=          |
+-----------+-------+---------+-----------+
|warning    |0      |0        |=          |
+-----------+-------+---------+-----------+
|error      |0      |0        |=          |
+-----------+-------+---------+-----------+



Global evaluation
-----------------
Your code has been rated at 10.00/10 (previous run: 10.00/10)

D:\dvp\tools\testlang\python\invalid_code>


--

Pierre Rouleau







































-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_01.py
Type: application/x-python
Size: 462 bytes
Desc: not available
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20080705/da1486c1/attachment.bin 


More information about the Python-Projects mailing list