[wingide-users] Uber-cheesy, may-not-always-work import organizer
Ken Kinder
kkinder at gmail.com
Mon Oct 23 13:38:26 MDT 2006
I've attached a script I've been using for a few weeks to help me manage my
imports. It provides two commands:
* add_import saves you the trouble of going to the top of the file to add an
import statement.
* organize_imports puts all your top-level imports at the top of your file,
sorts them, and dedups them.
add_import calls organize_imports
It does NOT consolidate imports like this into one line:
from pants import eggs
from pants import spam
It also does NOT work with lines like this:
from pants import eggs, \
spam
If someone wants to add those two features, well, that'd be awesome. :) I
seldom need either.
-Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: organize_import.py
Type: application/x-python
Size: 2834 bytes
Desc: not available
Url : /pipermail/wingide-users/attachments/20061023/492d6ea8/organize_import.bin
More information about the wingide-users
mailing list