Since it's been so long since the last release of PyChecker (8 days!), a new version of PyChecker is available for your hacking pleasure. PyChecker is a tool for finding bugs in python source code. It finds problems that are typically caught by a compiler for less dynamic languages, like C and C++. It is similar to lint. Comments, criticisms, new ideas, and other feedback is welcome. Many features and bug fixes are in this release. There are no outstanding bugs on Source Forge (and only 1 feature request). The feature request is lonely, so this release should spur a flurry of bugs and features. :-) Even the TODO list is shorter. There is only one known problem which is documented in the KNOWN_BUGS file. I don't believe this problem is too common. One new feature which I believe is quite important to point out is: * Allow pychecker to be imported (in your code do: import pychecker.check) This means that in your main program, if you make the first line (before any other imports): import pychecker.check PyChecker will install an __import__() function and will check every module that gets imported after itself. The warnings are printed to stdout (the console). (from pychecker import check probably also works.) The README/web page below has a little more detail. Let me know how it goes. Good Luck! Changes from 0.8.7 to 0.8.8: * Add -F/--config option to specify pycheckrc file to use Always read $HOME/.pycheckrc, .pycheckrc, and -F options in that order * Add -0/--abstract option to warn that subclass should override a base class whose method(s) only raise exceptions * Add -6/--exec option to warn when using the exec statement * Add -7/--slots option to warn about __slots__ usage problems * Add --emptyslots option to warn about empty __slots__ * Add check if __getattr[ibute]__ returns None, should raise an exception * Allow pychecker to be imported (in your code do: import pychecker.check) * Using vars() for format string argument works like locals() * Make unusedNames a prefix, so emptyVal, unusedVal, etc are also ignored * Fix -a/--initattr warning to actually warn when attributes are set outside of __init__(), but not in __init__() * Fix case where an implicit return did not generate a warning * Fix spurious warnings when using nested scopes, code should be checked now * Fix spurious warnings for unreachable code (not enough to enable, yet) * Fix spurious warnings for integer division from: (x + 100.0) / 10 * Fix spurious warnings for implicit returns when raise in except: clause * Fix various spurious warnings when using Python 2.2 * Fix spurious warning for overridden method mismatch when using exec * Fix spurious warning when doing len(filter(lambda x: ..., ...)) * Fix spurious warnings from some from ... import ... and deriving classes PyChecker is available on Source Forge: Web page: http://pychecker.sourceforge.net/ Project page: http://sourceforge.net/projects/pychecker/ Neal -- pychecker@metaslash.com
participants (1)
-
Neal Norwitz