aptana/Pydev — pull request #47 by jeremycarroll (2013-03-01 08:26:41+00:00)
Title: Organize Imports Improvements

This fork provides the following new functionality:
- pep8 compliance
- removal of unused imports
- application of imports organizer to a folder

On the preferences page for PyDev/Editor/Code Style/Imports

there are new options for:
- pep8 compliance
- removing unused imports

Both have a tooltip to give some advice.

The first identifies the doc string and places imports one line underneath, with system imports (found on the interpreter's python path), third party imports (found under site-packages), the main code, relative imports, and then __future__ imports - in that order, each section separated by a blank line, and with two blank lines after.
The functionality can be customized by customizing the python path of the interpreter.

The second removes unused imports using those marked by the code analysis tool. Since that is customizable, this customizes the unused imports removal. In particular, intended unused imports tend to be in __init__.py files, which are not analyzed for unused imports by default.