ANN: PyChecker v0.8

Neal Norwitz neal at metaslash.com
Tue Aug 7 08:20:58 EDT 2001


A new version of PyChecker is available for your hacking pleasure.

        PyChecker is a tool for finding common bugs in python source code.
        It finds problems that are typically caught by a compiler for less
        dynamic languages, like C and C++.

Comments, criticisms, new ideas, and other feedback is welcome.

Change Log from 0.7.5 to 0.8:
  * Add check for accessing list as list[1,2], should be slice 1:2
  * Add -J/maxargs to warn when using too many arguments
  * Add -K/maxlocals to warn when using too many local variables
  * Add -D/intdivide to warn when using integer division
  * Add -O/objattrs to warn when using object.attribute that doesn't exist
  * Add -M/reimportself to warn when a module imports itself
  * Add -E/unusednames to provide a list of unused names to ignore
        (default is: [ '_', 'empty', 'unused' ])
  * Major refactoring of warn.py -> utils, msgs, Warning, CodeChecks
  * Fix spurious warnings for No class attribute for dynamic classes
  * Fix spurious warnings when using objects from blacklisted modules
        (Instantiating object with arguments, but no constructor, etc)
  * Fix spurious warnings when using lambdas
  * Fix spurious warning (No global Y) when using: from X import Y
        (problem in python 1.5/1.6 only)

In case you missed 0.7.5, here's the change Log from 0.7 to 0.7.5:
  * 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'
  * Fix tests (forgot to add : after line number in expected results)


PyChecker is available on Source Forge:
    Web page:           http://pychecker.sourceforge.net/
    Project page:       http://sourceforge.net/projects/pychecker/

Neal
--
pychecker at metaslash.com




More information about the Python-list mailing list