##// END OF EJS Templates
Cleanup unused imports.
Matthias Bussonnier -
Show More
@@ -126,7 +126,7 b' import warnings'
126 126
127 127 from contextlib import contextmanager
128 128 from importlib import import_module
129 from typing import Iterator, List, Tuple, Iterable, Union
129 from typing import Iterator, List, Tuple, Iterable
130 130 from types import SimpleNamespace
131 131
132 132 from traitlets.config.configurable import Configurable
@@ -19,7 +19,7 b' spec.'
19 19 import sys
20 20
21 21 from traitlets.config.configurable import Configurable
22 from traitlets import List, Dict
22 from traitlets import List
23 23
24 24 # This used to be defined here - it is imported for backwards compatibility
25 25 from .display import publish_display_data
@@ -13,7 +13,6 b''
13 13
14 14 import abc
15 15 import ast
16 import asyncio
17 16 import atexit
18 17 import builtins as builtin_mod
19 18 import functools
@@ -87,6 +86,7 b' from ast import AST'
87 86
88 87 # NoOpContext is deprecated, but ipykernel imports it from here.
89 88 # See https://github.com/ipython/ipykernel/issues/157
89 # (2016, let's try to remove than in IPython 8.0)
90 90 from IPython.utils.contexts import NoOpContext
91 91
92 92 try:
@@ -5,7 +5,6 b' import argparse'
5 5 from logging import error
6 6 import io
7 7 from pprint import pformat
8 import textwrap
9 8 import sys
10 9 from warnings import warn
11 10
@@ -12,7 +12,6 b' import os'
12 12 import re
13 13 import shlex
14 14 import sys
15 from subprocess import Popen, PIPE
16 15
17 16 from IPython.core.magic import Magics, magics_class, line_magic
18 17
@@ -16,7 +16,6 b' test_run.py calls it.'
16 16 #-----------------------------------------------------------------------------
17 17 # Module imports
18 18 #-----------------------------------------------------------------------------
19 import sys
20 19
21 20 from IPython import get_ipython
22 21
@@ -3,7 +3,6 b' Test for async helpers.'
3 3
4 4 Should only trigger on python 3.5+ or will have syntax errors.
5 5 """
6 import sys
7 6 from itertools import chain, repeat
8 7 import nose.tools as nt
9 8 from textwrap import dedent, indent
@@ -14,7 +14,7 b' from IPython.core.getipython import get_ipython'
14 14 from IPython.utils.io import capture_output
15 15 from IPython.utils.tempdir import NamedFileInTemporaryDirectory
16 16 from IPython import paths as ipath
17 from IPython.testing.tools import AssertPrints, AssertNotPrints
17 from IPython.testing.tools import AssertNotPrints
18 18
19 19 import IPython.testing.decorators as dec
20 20
@@ -1,4 +1,3 b''
1 from backcall import callback_prototype
2 1 import unittest
3 2 from unittest.mock import Mock
4 3 import nose.tools as nt
@@ -10,7 +10,6 b' import nose.tools as nt'
10 10 # our own packages
11 11 from IPython.core import autocall
12 12 from IPython.testing import tools as tt
13 from IPython.utils import py3compat
14 13
15 14 #-----------------------------------------------------------------------------
16 15 # Globals
@@ -26,8 +26,6 b' import IPython.testing.tools as tt'
26 26
27 27 from unittest import TestCase
28 28
29 from IPython.testing.decorators import skipif
30
31 29 from IPython.extensions.autoreload import AutoreloadMagics
32 30 from IPython.core.events import EventManager, pre_run_cell
33 31
@@ -141,7 +139,6 b' def pickle_get_current_class(obj):'
141 139 class TestAutoreload(Fixture):
142 140
143 141 def test_reload_enums(self):
144 import enum
145 142 mod_name, mod_fn = self.new_module(textwrap.dedent("""
146 143 from enum import Enum
147 144 class MyEnum(Enum):
@@ -1,4 +1,4 b''
1 1 from warnings import warn
2 2
3 warn("IPython.utils.daemonize has moved to ipyparallel.apps.daemonize", stacklevel=2)
3 warn("IPython.utils.daemonize has moved to ipyparallel.apps.daemonize since IPython 4.0", DeprecationWarning, stacklevel=2)
4 4 from ipyparallel.apps.daemonize import daemonize
@@ -15,7 +15,6 b' Utilities for working with stack frames.'
15 15 #-----------------------------------------------------------------------------
16 16
17 17 import sys
18 from IPython.utils import py3compat
19 18
20 19 #-----------------------------------------------------------------------------
21 20 # Code
@@ -5,9 +5,6 b''
5 5 # Distributed under the terms of the Modified BSD License.
6 6
7 7
8 import io as stdlib_io
9 import os.path
10 import stat
11 8 import sys
12 9 from io import StringIO
13 10
@@ -16,9 +13,7 b' import unittest'
16 13
17 14 import nose.tools as nt
18 15
19 from IPython.testing.decorators import skipif, skip_win32
20 16 from IPython.utils.io import IOStream, Tee, capture_output
21 from IPython.utils.tempdir import TemporaryDirectory
22 17
23 18
24 19 def test_tee_simple():
@@ -21,9 +21,9 b' import IPython'
21 21 from IPython import paths
22 22 from IPython.testing import decorators as dec
23 23 from IPython.testing.decorators import (skip_if_not_win32, skip_win32,
24 onlyif_unicode_paths, skipif,
24 onlyif_unicode_paths,
25 25 skip_win32_py38,)
26 from IPython.testing.tools import make_tempfile, AssertPrints
26 from IPython.testing.tools import make_tempfile
27 27 from IPython.utils import path
28 28 from IPython.utils.tempdir import TemporaryDirectory
29 29
@@ -16,7 +16,6 b' Tests for platutils.py'
16 16
17 17 import sys
18 18 import os
19 from unittest import TestCase
20 19
21 20 import nose.tools as nt
22 21
General Comments 0
You need to be logged in to leave comments. Login now