importchecker


Nameimportchecker JSON
Version 2.0 PyPI version JSON
download
home_pagehttp://pypi.python.org/pypi/importchecker
SummaryImportchecker finds unused imports in Python modules.
upload_time2018-02-22 10:18:14
maintainer
docs_urlNone
authorJan-Wijbrand Kolman
requires_python
licenseZPL 2.1
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Importchecker
=============

What is importchecker?
----------------------

Importchecker is a commandline 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 either a directory or a Python file::

  $ importchecker /path/to/a/source/tree
  $ importchecker /path/to/a/source/tree/module.py

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"

.. _`zc.buildout`: http://pypi.python.org/pypi/zc.buildout

Known issues
------------

* Official Python 2 support was dropped. Informal tests indicate
  `importchecker` still works for Python 2, but since the AST structures
  can differ between Python 2 and Python 3, no support is formally claimed.

* One source tree path argument at the time can be passed to the command
  line utility.

* Command line argument parsing is rather naïve.

Changes
=======

2.0 (2018-02-22)
----------------

* The tests indicate `importchecker` still works for Python 2, but since
  the AST structures can differ between Python 2 and Python 3, no support is
  formally claimed.

1.2 (2018-02-21)
----------------

* Start on test coverage.

* Claim support for Python 2.7, drop claims for earlier versions.

1.1 (2012-01-09)
----------------

* 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.

1.0 (2008-05-06)
----------------

* Initial packaging

* Make the importchecker work on python 2.5

Credits
=======

* Martijn Faassen (original developer)
* Jan-Wijbrand Kolman (packaging)
* Philipp von Weitershausen
* various comitters on svn.zope.org.

Download
========

            

Raw data

            {
    "_id": null,
    "home_page": "http://pypi.python.org/pypi/importchecker",
    "name": "importchecker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jan-Wijbrand Kolman",
    "author_email": "janwijbrand@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/52/b60c66fa0226eb99cd9bfecfb7e149739444fac765e0e27c8783558af5cd/importchecker-2.0.tar.gz",
    "platform": "",
    "description": "Importchecker\n=============\n\nWhat is importchecker?\n----------------------\n\nImportchecker is a commandline utility to find unused imports in Python\nmodules.\n\nIts output is \"grep-like\" (and thus \"emacs-friendly\"), reporting both the\nmodule's filenames and line numbers where names are imported that are not\nacually used in the module.\n\nImportchecker will not modify any of the source files. Whether the import\nneeds to be removed is left to the judgement of the developer.\n\nInstallation\n------------\n\nThe importchecker commandline utility can be installed using the\n``easy_install`` command::\n\n  $ sudo easy_install importchecker\n\nThe command can then be invoked with either a directory or a Python file::\n\n  $ importchecker /path/to/a/source/tree\n  $ importchecker /path/to/a/source/tree/module.py\n\nBuildout\n--------\n\nProjects that make use of `zc.buildout`_ for development might find the\nfollowing ``buildout.cfg.`` snippet useful for using the importchecker on\nthe developed codebase::\n\n  [buildout]\n  ...\n  parts = importchecker ...\n  ...\n\n  [importchecker]\n  recipe = zc.recipe.egg\n  eggs = importchecker\n  arguments = \"${buildout:directory}/src\"\n\n.. _`zc.buildout`: http://pypi.python.org/pypi/zc.buildout\n\nKnown issues\n------------\n\n* Official Python 2 support was dropped. Informal tests indicate\n  `importchecker` still works for Python 2, but since the AST structures\n  can differ between Python 2 and Python 3, no support is formally claimed.\n\n* One source tree path argument at the time can be passed to the command\n  line utility.\n\n* Command line argument parsing is rather na\u00efve.\n\nChanges\n=======\n\n2.0 (2018-02-22)\n----------------\n\n* The tests indicate `importchecker` still works for Python 2, but since\n  the AST structures can differ between Python 2 and Python 3, no support is\n  formally claimed.\n\n1.2 (2018-02-21)\n----------------\n\n* Start on test coverage.\n\n* Claim support for Python 2.7, drop claims for earlier versions.\n\n1.1 (2012-01-09)\n----------------\n\n* Applied provided by wosc enabling running the import checker on\n  individual python modules not just directories.\n\n* Report the absolute path for modules when needed, relative paths (relative\n  to the current working directory, that is) when possible.\n\n1.0 (2008-05-06)\n----------------\n\n* Initial packaging\n\n* Make the importchecker work on python 2.5\n\nCredits\n=======\n\n* Martijn Faassen (original developer)\n* Jan-Wijbrand Kolman (packaging)\n* Philipp von Weitershausen\n* various comitters on svn.zope.org.\n\nDownload\n========\n",
    "bugtrack_url": null,
    "license": "ZPL 2.1",
    "summary": "Importchecker finds unused imports in Python modules.",
    "version": "2.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "12c13174af41b143c010ae5f980bad84",
                "sha256": "e8c724203106f33f2678a95d8aa58e9f8f71ba81700e51e031a9a99118d3e723"
            },
            "downloads": -1,
            "filename": "importchecker-2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "12c13174af41b143c010ae5f980bad84",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11498,
            "upload_time": "2018-02-22T10:18:14",
            "upload_time_iso_8601": "2018-02-22T10:18:14.331484Z",
            "url": "https://files.pythonhosted.org/packages/ad/52/b60c66fa0226eb99cd9bfecfb7e149739444fac765e0e27c8783558af5cd/importchecker-2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-02-22 10:18:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "importchecker"
}
        
Elapsed time: 0.02372s