durusmail: qp: Checking Code with qpcheck.py
Checking Code with qpcheck.py
2009-02-18
2009-02-19
Checking Code with qpcheck.py
Michael Watkins
2009-02-19
On Wed, February 18, 2009 2:48 pm, Binger David wrote:
> The "undefined" names are usually programming mistakes for us, since we
> never use "*" imports or other tricky namespace changes.  Note that
> qpcheck.py does not check that imports are valid, and it does not check
> methods or attributes at all.

Likewise here.

> I just ran qpcheck.py, using python3.0, on the current (revision 69741)
> of the py3k standard library and filtered the output with "grep undefined".
>  The results are below.  I doubt if all of these are really bugs that
> need fixing, but I know that some of these are errors.

Interesting!

> If you haven't tried running qpcheck.py on your code, you might like
> to try it. I'd be interested to know how it goes.

I have ``qpcheck.py %`` called by a vim keystroke mapping - as I work on a
module, and certainly before I check in changes, I run qpcheck.py against
it. Certainly it has saved me from doing some silly things over the years
and its very useful when refactoring and simplifying code to hunt down
unused imports.

reply