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

Pierre Rouleau prouleau001 at sympatico.ca
Wed Jul 9 13:34:03 CEST 2008


Sylvain Thénault wrote:
> On Sat, Jul 05, 2008 at 05:21:20PM -0400, Pierre Rouleau wrote:
>   
>> Hi.  I think I'v found a bug in Pylint 0.14.0
>>     
>
> Hi Pierre!
>   
Bonjour!
>   
>> 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...
>>     
>
> huum, I'm afraid that this has never been implemented in pylint (yet).
> The only thing that has been done is checking of argument consistency
> when defining/overriding *methods*. Function/methods calls aren't
> checked, though this could be done quite easily now that we have a
> better inference mecanism. The problem is that, as you may have noticed, 
> i'm really missing some time to work on pylint those days. For instance 
> I've started a few months ago some work on astng to have it working using
> either the compiler module or the new _ast of python 2.5 but I've not
> yet found the time to finalize it. Hope I'll get some time back in a
> near future for the pending stuff I've in mind for pylint. I'll include
> function calls checking in this, I've created a ticket for this so I
> wont forget: http://www.logilab.org/ticket/5561.
>
> Thank you for the already written test file ;)
> Cheers,
>   
Ok. Thanks.  I never realized there was a difference in treatment of 
methods and functions in pylint.  I think it would indeed be a good 
thing to be able to detect such discrepancies. 

Pierre


More information about the Python-Projects mailing list