Merge pull request #3518 from takluyver/unused-imports

Clear up unused imports

Static analysis revealed a load of things that are imported but not used. I've tried to leave things that look like part of the API, and clear up other things.

Noticed a few test functions which had been copy-pasted without changing the name, in which case only the later one will run. I gave them separate names.
This commit is contained in:
Matthias Bussonnier 2013-07-04 02:24:15 -07:00
commit 1bbbeddafd
5 changed files with 4 additions and 8 deletions

View File

@ -27,7 +27,6 @@ import socket
import sys
import threading
import time
import uuid
import webbrowser
@ -36,7 +35,6 @@ import webbrowser
from IPython.utils.zmqrelated import check_for_zmq
check_for_zmq('2.1.11', 'IPython.html')
import zmq
from jinja2 import Environment, FileSystemLoader
# Install the pyzmq ioloop. This has to be done before anything else from

View File

@ -22,13 +22,11 @@ from tornado import web
from zmq.eventloop import ioloop
from IPython.config.configurable import LoggingConfigurable
from IPython.config.loader import load_pyconfig_files
from IPython.utils.traitlets import Dict, Instance, CFloat
from IPython.parallel.apps.ipclusterapp import IPClusterStart
from IPython.core.profileapp import list_profiles_in
from IPython.core.profiledir import ProfileDir
from IPython.utils.path import get_ipython_dir
from IPython.utils.sysinfo import num_cpus
#-----------------------------------------------------------------------------

View File

@ -20,7 +20,7 @@ from tornado import web
from IPython.kernel.multikernelmanager import MultiKernelManager
from IPython.utils.traitlets import (
Dict, List, Unicode, Integer,
Dict, List, Unicode,
)
#-----------------------------------------------------------------------------

View File

@ -57,7 +57,7 @@ from nose.core import TestProgram
from IPython.utils import py3compat
from IPython.utils.importstring import import_item
from IPython.utils.path import get_ipython_module_path, get_ipython_package_dir
from IPython.utils.process import find_cmd, pycmd2argv
from IPython.utils.process import pycmd2argv
from IPython.utils.sysinfo import sys_info
from IPython.utils.tempdir import TemporaryDirectory
from IPython.utils.warn import warn

View File

@ -20,7 +20,7 @@ from subprocess import Popen, PIPE
import nose.tools as nt
from IPython.testing import decorators as dec
from IPython.testing.ipunittest import ParametricTestCase
from IPython.utils.io import Tee, capture_output
from IPython.utils.py3compat import doctest_refactor_print
@ -38,7 +38,7 @@ def test_tee_simple():
nt.assert_equal(chan.getvalue(), text+"\n")
class TeeTestCase(dec.ParametricTestCase):
class TeeTestCase(ParametricTestCase):
def tchan(self, channel, check='close'):
trap = StringIO()