Show More
@@ -7,7 +7,7 b' Shim to maintain backwards compatibility with old IPython.config imports.' | |||
|
7 | 7 | import sys |
|
8 | 8 | from warnings import warn |
|
9 | 9 | |
|
10 |
from |
|
|
10 | from .utils.shimmodule import ShimModule, ShimWarning | |
|
11 | 11 | |
|
12 | 12 | warn("The `IPython.config` package has been deprecated since IPython 4.0. " |
|
13 | 13 | "You should import from traitlets.config instead.", ShimWarning) |
@@ -6,11 +6,11 b' import pytest' | |||
|
6 | 6 | import pathlib |
|
7 | 7 | import shutil |
|
8 | 8 | |
|
9 |
from |
|
|
9 | from .testing import tools | |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | def get_ipython(): |
|
13 |
from |
|
|
13 | from .terminal.interactiveshell import TerminalInteractiveShell | |
|
14 | 14 | if TerminalInteractiveShell._instance: |
|
15 | 15 | return TerminalInteractiveShell.instance() |
|
16 | 16 | |
@@ -60,7 +60,7 b' def inject():' | |||
|
60 | 60 | builtins.ip = get_ipython() |
|
61 | 61 | builtins.ip.system = types.MethodType(xsys, ip) |
|
62 | 62 | builtins.ip.builtin_trap.activate() |
|
63 |
from |
|
|
63 | from .core import page | |
|
64 | 64 | |
|
65 | 65 | page.pager_page = nopage |
|
66 | 66 | # yield |
@@ -25,7 +25,7 b' import re' | |||
|
25 | 25 | import sys |
|
26 | 26 | |
|
27 | 27 | from traitlets.config.configurable import Configurable |
|
28 |
from |
|
|
28 | from .error import UsageError | |
|
29 | 29 | |
|
30 | 30 | from traitlets import List, Instance |
|
31 | 31 | from logging import error |
@@ -30,9 +30,9 b' from time import time' | |||
|
30 | 30 | from zipimport import zipimporter |
|
31 | 31 | |
|
32 | 32 | # Our own imports |
|
33 |
from |
|
|
34 |
from |
|
|
35 |
from |
|
|
33 | from .completer import expand_user, compress_user | |
|
34 | from .error import TryNext | |
|
35 | from ..utils._process_common import arg_split | |
|
36 | 36 | |
|
37 | 37 | # FIXME: this should be pulled in with the right call via the component system |
|
38 | 38 | from IPython import get_ipython |
@@ -20,10 +20,10 b' from io import StringIO' | |||
|
20 | 20 | from decorator import decorator |
|
21 | 21 | |
|
22 | 22 | from traitlets.config.configurable import Configurable |
|
23 |
from |
|
|
24 |
from |
|
|
25 |
from |
|
|
26 |
from |
|
|
23 | from .getipython import get_ipython | |
|
24 | from ..utils.sentinel import Sentinel | |
|
25 | from ..utils.dir2 import get_real_method | |
|
26 | from ..lib import pretty | |
|
27 | 27 | from traitlets import ( |
|
28 | 28 | Bool, Dict, Integer, Unicode, CUnicode, ObjectName, List, |
|
29 | 29 | ForwardDeclaredInstance, |
@@ -1015,7 +1015,7 b' def format_display_data(obj, include=None, exclude=None):' | |||
|
1015 | 1015 | data dict. If this is set all format types will be computed, |
|
1016 | 1016 | except for those included in this argument. |
|
1017 | 1017 | """ |
|
1018 |
from |
|
|
1018 | from .interactiveshell import InteractiveShell | |
|
1019 | 1019 | |
|
1020 | 1020 | return InteractiveShell.instance().display_formatter.format( |
|
1021 | 1021 | obj, |
@@ -9,9 +9,9 b' import os' | |||
|
9 | 9 | import sqlite3 |
|
10 | 10 | |
|
11 | 11 | from traitlets.config.application import Application |
|
12 |
from |
|
|
12 | from .application import BaseIPythonApplication | |
|
13 | 13 | from traitlets import Bool, Int, Dict |
|
14 |
from |
|
|
14 | from ..utils.io import ask_yes_no | |
|
15 | 15 | |
|
16 | 16 | trim_hist_help = """Trim the IPython history database to the last 1000 entries. |
|
17 | 17 |
@@ -40,7 +40,7 b' import subprocess' | |||
|
40 | 40 | import warnings |
|
41 | 41 | import sys |
|
42 | 42 | |
|
43 |
from |
|
|
43 | from .error import TryNext | |
|
44 | 44 | |
|
45 | 45 | # List here all the default hooks. For now it's just the editor functions |
|
46 | 46 | # but over time we'll move here all the public API for user-accessible things. |
@@ -83,7 +83,7 b' def editor(self, filename, linenum=None, wait=True):' | |||
|
83 | 83 | raise TryNext() |
|
84 | 84 | |
|
85 | 85 | import tempfile |
|
86 |
from |
|
|
86 | from ..utils.decorators import undoc | |
|
87 | 87 | |
|
88 | 88 | @undoc |
|
89 | 89 | def fix_error_editor(self,filename,linenum,column,msg): |
@@ -212,7 +212,7 b' def pre_run_code_hook(self):' | |||
|
212 | 212 | def clipboard_get(self): |
|
213 | 213 | """ Get text from the clipboard. |
|
214 | 214 | """ |
|
215 |
from |
|
|
215 | from ..lib.clipboard import ( | |
|
216 | 216 | osx_clipboard_get, tkinter_clipboard_get, |
|
217 | 217 | win32_clipboard_get |
|
218 | 218 | ) |
@@ -17,13 +17,13 b' import sys' | |||
|
17 | 17 | from getopt import getopt, GetoptError |
|
18 | 18 | |
|
19 | 19 | from traitlets.config.configurable import Configurable |
|
20 |
from |
|
|
21 |
from |
|
|
22 |
from |
|
|
20 | from . import oinspect | |
|
21 | from .error import UsageError | |
|
22 | from .inputtransformer2 import ESC_MAGIC, ESC_MAGIC2 | |
|
23 | 23 | from decorator import decorator |
|
24 |
from |
|
|
25 |
from |
|
|
26 |
from |
|
|
24 | from ..utils.ipstruct import Struct | |
|
25 | from ..utils.process import arg_split | |
|
26 | from ..utils.text import dedent | |
|
27 | 27 | from traitlets import Bool, Dict, Instance, observe |
|
28 | 28 | from logging import error |
|
29 | 29 |
@@ -12,16 +12,16 b' transforms are used to implement additional syntax such as !ls and %magic.' | |||
|
12 | 12 | from keyword import iskeyword |
|
13 | 13 | import re |
|
14 | 14 | |
|
15 |
from |
|
|
15 | from .autocall import IPyAutocall | |
|
16 | 16 | from traitlets.config.configurable import Configurable |
|
17 |
from |
|
|
17 | from .inputtransformer2 import ( | |
|
18 | 18 | ESC_MAGIC, |
|
19 | 19 | ESC_QUOTE, |
|
20 | 20 | ESC_QUOTE2, |
|
21 | 21 | ESC_PAREN, |
|
22 | 22 | ) |
|
23 |
from |
|
|
24 |
from |
|
|
23 | from .macro import Macro | |
|
24 | from .splitinput import LineInfo | |
|
25 | 25 | |
|
26 | 26 | from traitlets import ( |
|
27 | 27 | List, Integer, Unicode, Bool, Instance, CRegExp |
@@ -9,8 +9,8 b' import shutil' | |||
|
9 | 9 | import errno |
|
10 | 10 | |
|
11 | 11 | from traitlets.config.configurable import LoggingConfigurable |
|
12 |
from |
|
|
13 |
from |
|
|
12 | from ..paths import get_ipython_package_dir | |
|
13 | from ..utils.path import expand_path, ensure_dir_exists | |
|
14 | 14 | from traitlets import Unicode, Bool, observe |
|
15 | 15 | |
|
16 | 16 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now