A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2012-February/116221.html below:

[Python-Dev] cpython (3.2): remove unused import

[Python-Dev] cpython (3.2): remove unused import [Python-Dev] cpython (3.2): remove unused importChristian Heimes lists at cheimes.de
Mon Feb 6 01:53:48 CET 2012
Am 06.02.2012 01:39, schrieb Brett Cannon:
> I'm going to assume pylint or pyflakes would throw too many warnings on
> the stdlib, but would it be worth someone's time to write a simple
> unused import checker to run over the stdlib on occasion? I bet even one
> that did nothing more than a regex search for matched import statements
> would be good enough.

Zope 3 has an import checker that uses the compiler package and AST tree
to check for unused imports. It seems like a better approach than a
simple regex search.

http://svn.zope.org/Zope3/trunk/utilities/importchecker.py?rev=25177&view=auto

The importorder tool uses the tokenizer module to order import statements.

http://svn.zope.org/Zope3/trunk/utilities/importorder.py?rev=25177&view=auto

Both are written by Jim Fulton.

Christian

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4