PyChecker - a python source code bug finder

Neal Norwitz neal at metaslash.com
Thu Apr 12 00:26:06 EDT 2001


Robin Becker wrote:
> 
> I get some oddities
> 
> 1) I see messages like this
>   c:\python\reportlab\graphics\charts\axes.py:588 Base class 
>    (reportlab.graphics.charts.axes.ValueAxis) __init__() not called

There was a bug in 0.1 that caused this to happen.  This is handled better
in 0.2 (current released version).  I'm not positive it works in all cases,
but it is definitely better than before.

Better yet, get the current version from CVS.  There are more
warnings (at least one I know of, unused local variables)
that can be generated and there are now command line options.

Here are the current options that can be specified on the command line:

  Options:          Toggle warning for ... [default]
    -s, --doc         turn off all warnings for no doc strings
    -m, --moduledoc   no module doc strings [on]
    -c, --classdoc    no class doc strings [on]
    -f, --funcdoc     no function/method doc strings [off]

    -i, --import      unused imports [on]
    -l, --local       unused local variables, except tuples [on]
    -t, --tuple       all unused local variables, including tuples [off]
    -v, --var         all unused module variables [off]
    -p, --privatevar  unused private module variables [on]

    -d, --debug       turn on debugging for checker [off]

In addition, you should be able to specify python module/package
names or file names (thanks to Jeff Collins).  This should help
Mac users, I believe.

> Still it seems quite useful. Can it do anything with unnecessary
> 
> from M import *

It doesn't by default, but if you use the -v option, it does.

Neal

> --
> Robin Becker




More information about the Python-list mailing list