lint for Python?

Aaron "Castironpi" Brady castironpi at
Sun Oct 5 16:51:08 CEST 2008

Pat wrote:
> I've been searching for a good multi-module lint checker for Python and 
> I haven't found one yet.
> Pylint does a decent job at checking for errors only within a single 
> module.
> Here's one of my problems.  I have two modules.
> In module one, I have a function:
> def foo( host, userid, password ):
>     pass
> In module two, I call that function:
> foo( userid, password)
> lint doesn't find that error and it won't be caught until it's called 
> while the program is running.  I don't want that error found at 3AM.
> I've never used a language that didn't catch that type of error.  I'm 
> quite surprised that Python is being used by a number of major 
> companies.  How you catch these types of errors?
> I've spoken to tech support at Wing and they weren't aware of a 
> multi-module lint but they're considering putting their own lint into 
> their IDE.
> Thank you
> -- 

The example you gave is specific.  You could catch that one by hand. 
But, would it hurt, perhaps by causing neglect of other errors; and 
would it be worth the effort?  And, if you're using any dynamics at all, 
catching that one's even in question.

from mod import foo
bar= foo
bar( arg1, arg2 )

It would add difficulty to catching by hand.  Same with variable 
argument lists.

from mod import foo
args= ( arg1, arg2 )
foo( *args )

If you could knock off an error and ignore the false positives, that 
might be worth an afternoon.

More information about the Python-list mailing list