importchecker 1.1

Finds unused imports in Python modules

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in importchecker 1.1:

  • Applied provided by wosc enabling running the import checker on individual python modules not just directories.
  • Report the absolute path for modules when needed, relative paths (relative to the current working directory, that is) when possible.
Read full changelog
send us
an update
LICENSE TYPE:
ZPL (Zope Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Jan-Wijbrand Kolman
HOMEPAGE:
pypi.python.org
CATEGORY:
ROOT \ Programming \ Quality Assurance and Testing
importchecker is a command-line utility to find unused imports in Python modules.

Its output is "grep-like" (and thus "emacs-friendly"), reporting both the module's filenames and line numbers where names are imported that are not acually used in the module.

Importchecker will not modify any of the source files. Whether the import needs to be removed is left to the judgement of the developer.

Installation

The importchecker commandline utility can be installed using the easy_install command:

 sudo easy_install importchecker

The command can then be invoked with:

 importchecker /path/to/a/source/tree

Buildout

Projects that make use of zc.buildout for development might find the following buildout.cfg. snippet useful for using the importchecker on the developed codebase:

[buildout]
...
parts = importchecker ...
...

[importchecker]
recipe = zc.recipe.egg
eggs = importchecker
arguments = "${buildout:directory}/src"

Last updated on January 10th, 2012

requirements limitations

#imports modules #import checker #Python modules #Python #modules #importer #checker

Add your review!

SUBMIT