[Zope3-Users] Utility for removing unneeded import statements

Doyon, Jean-Francois jdoyon at NRCan.gc.ca
Tue Jun 5 08:15:37 EDT 2007


You may want to look into PyLint:

http://www.logilab.org/857

Or PyChecker:

http://pychecker.sourceforge.net/

I use PyLint through PyDev/Eclipse, and it's a godsend ...

J.F. 

-----Original Message-----
From: zope3-users-bounces+jdoyon=nrcan.gc.ca at zope.org
[mailto:zope3-users-bounces+jdoyon=nrcan.gc.ca at zope.org] On Behalf Of
Hermann Himmelbauer
Sent: June 5, 2007 06:51
To: zope3-users at zope.org
Subject: [Zope3-Users] Utility for removing unneeded import statements

Hi,
During development and especially refactoring, I'm often confronted with
cleaning up import statements.

Missing imports are reported by Python, however, unneeded imports are
not. I don't know if unneded imports are a performance issue,
nevertheless it probably makes sense to clean them up from time to time.

Therefore I wonder if there's some tool that can automatically check if
an import is needed or not. Probably this is easy to write, but perhaps
somebody has already done so?

What would be nice, would also be a tool that crawls through a python
package and also checks any missing imports and reports all of them at
once. When I refactor code, I often have to restart zope3 over and over,
only due to missing import statements.

Best Regards,
Hermann

--
x1 at aon.at
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
_______________________________________________
Zope3-users mailing list
Zope3-users at zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


More information about the Zope3-users mailing list