[IPython-dev] Unused imports

Fernando Perez fperez.net at gmail.com
Sun Jul 13 01:31:07 EDT 2008


On Sat, Jul 12, 2008 at 5:28 PM, Gael Varoquaux
<gael.varoquaux at normalesup.org> wrote:
> I am currently exploring the IPython codebase (I am looking at how to
> extract the line processing of IPython0 to port it in IPython1).
> We all know that the IPython codebase is a web of entangled object hard
> to break down. One thing that strikes me as a low hanging fruit to
> improve the situation, though, is cleaning up the imports. Almost every
> file I have looked at has a large amount of unused imports.

Historical cruft left over after something gets split into two files,
old imports stay behind.

> If you use a powerful IDE like eclipse, you can configure it to show the
> unused imports, but if you like emacs or vim like me you can use pyflakes
> to check for these. Inspired by the mighty Robert Kern, I have binded one
> of my keys in vim to running the file in pyflakes. This is easy and
> allows to spot the unused imports in a split second.

Go for it, by all means!



More information about the IPython-dev mailing list