From: Neal Norwitz <neal@metaslash.com> To: python-list@python.org Subject: ANN: PyChecker version 0.7.5 Date: Sun, 22 Jul 2001 13:53:08 -0400 In keeping with the open source spirit--release early, release often-- I am releasing another version of PyChecker. Or at least half a version... It's amazing how motivation it is to code after spending a week doing doc. So that means the doc is even more lacking for PyChecker. :-) There are several highlights to this version. The most significant changes involve the new functionality to suppress warnings. Two mechanisms are provided to get PyChecker to shut up. 1) You can put directives in the code: __pychecker__ = 'no-namedargs maxlines=0 maxbranches=0' This will turn off checking for named arguments, max lines, and max branches. If the line is used at the module scope, the new configuration will be used for the module, including classes, functions, and methods in the module. If the line is used within a function/method, the new configuration will be used within the function/method only. 2) You can define suppressions, a dictionary, in .pycheckrc. suppressions = { 'mymodule': 'maxreturns=0' } This will turn off max returns for all functions/methods within mymodule. You can specify modules, classes, functions/methods as the keys: 'mymodule.myfunc' 'mymodule.myclass' 'mymodule.myclass.mymethod' The suppressions will only effect the scope specified. Regular expressions aren't currently supported. Would that be useful? This change affected the way the command line processing occurred. The names used in warning suppression are the same as those used for command line processing. So for the long arguments, if you specify the argument as "arg" that means the argument will be turned on. If you specify "no-arg" that means the argument will be turned off. Other than that change, there were more warnings added (and catching more cases). Also, I tried to clean up a lot of the spurious warnings. So you should get a better result set now. The only big problem that exists (that I know of) is that packages are not handled properly. I hope to fix that and add a lot more static type checks. Let me know if you have any problems, questions, suggestions, etc. Change Log: * Suppress warnings on a per module/function/class/method basis with new suppressions = {} in .pycheckrc * Suppress warnings by setting __pychecker__ in source code * Change long argument behaviour --arg sets arg to true, --no-arg sets arg to false (also works for warning suppression) * Add -U/--reuseattr check if function/class/method names are reused * Add -T/--argsused check for unused method/function arguments * Add -G/--selfused ignore if self is unused in a method (requires --argsused) * Add -q/--stdlib to disable warnings from the standard library * Add -o/--override warning when a method has different signature than one being overridden in a base class * Add -F/--rcfile to generate a .pycheckrc file * Fix checking files in standard library before local file * Fix spurious warning when using from X import Y and imports in methods (Module (m) re-imported) * Fix spurious warning when doing: from X import Y, Z * Fix spurious warning when deriving from Exception() and instantiating object with multiple arguments * Fix method argument checks when calling base class methods * Fix error msg to base constructors (msg count was wrong) * Fix access to builtin module attributes (e.g., sys.exc_value) generating 'No attribute warnings' PyChecker is available on Source Forge: Web page: http://pychecker.sourceforge.net/ Project page: http://sourceforge.net/projects/pychecker/ Neal -- pychecker@metaslash.com -- http://mail.python.org/mailman/listinfo/python-list