[Python-projects] Re: pylint0.3.2 devel & common-0.4.2 devel: Some remarks

Nicolas Chauvat Nicolas.Chauvat@logilab.fr
Fri, 23 Jan 2004 18:47:54 +0100


From: Sylvain Thénault <Sylvain.Thenault@logilab.fr>
To: Wolfgang Grafen <wolfgang.grafen@nospam.com>
Date: Fri, 23 Jan 2004 18:33:33 +0100
Subject: Re: pylint0.3.2 devel & common-0.4.2 devel: Some remarks

On Friday 23 January à 16:17, Wolfgang Grafen wrote:
 
> > W:  6:Messenger: Class has no __init__ method
> Isn't this too paranoid?

well, not in term of future extensibility. Having an empty constructor
and calling it in children classes allow me to change my mind latter,
and to add some initialisations in the __init__ method without having to
change all the children classes. 

> > W: 13:Messenger.__call__: Use * or ** magic
> On purpose. That is what this construct is for.

So ignore it. This warning has been added since our experience has shown
that developpers may abuse from this construction. That doesn't mean you
should not use it in your case.
 
> > W:  0:Requester.register: Comma not followed by a space
> >         self.request_dict.setdefault(address,{req_name:handler})
> >                                            ^^
> What is the message?? which line??

this message indicates that the comma after "address" should be followed
by a space. The line number problem is a known bug, coming from the
compiler.ast module in the standard library (all nodes doesn't have a
line number, and so sometimes pylint fail to guess it).

> > E: 36:Cntr_class.get_cntr: Class method doesn't have "cls" as first argument
> I used this construct for the first time but it seems working for me

it is working. It only tells you that class method should have "cls"
instead of "self" as first argument. I'll probably reformulate this
message the next pylint version to make it clearer.


> > W: 50:A: Invalid name "A" (should match [A-Z][a-zA-Z1-9]+)
> As it is working it is obviously not invalid. Change '+' to '*'

true
 
 
> > MESSAGE ID  OCCURENCES  
> > W0324       30 
> You mentioned my name so I found pylint again through Google search.
> My imagination was to print out
> 
>   W0324-1-22:Requester.__call__: Comma not followed by a space
> 
> continuing with W0324-1-23 and so on if continuing lines refer to the same
> message. With the meaning <MSG><ID>-<CNT>-<LINENO>.
> Then you can filter with grep
> 
> pylint instcntr5.py |grep W0324
> 
> or suppress
> pylint instcntr5.py |grep -v W0324
> 
> and so on.
 
I know. This is just a bonus. I think you're looking for the
--include-ids option.
 
> > Global evaluation
> > -----------------
> >
> > Your code has been rated at -0.16/10 (previous run: -0.16/10)
> Minus means even worse than worse?

Yep ;o)


-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org