|
64 | 64 | sage: shell.quit()
|
65 | 65 | """
|
66 | 66 |
|
67 |
| -from IPython.core.magic import Magics, magics_class, line_magic, cell_magic |
68 | 67 | from IPython.core.display import HTML
|
69 | 68 | from IPython.core.getipython import get_ipython
|
| 69 | +from IPython.core.magic import Magics, cell_magic, line_magic, magics_class |
70 | 70 |
|
71 |
| -from sage.repl.load import load_wrap |
72 | 71 | from sage.env import SAGE_IMPORTALL, SAGE_STARTUP_FILE
|
73 | 72 | from sage.misc.lazy_import import LazyImport
|
74 | 73 | from sage.misc.misc import run_once
|
| 74 | +from sage.repl.load import load_wrap |
75 | 75 |
|
76 | 76 |
|
77 | 77 | def _running_in_notebook():
|
@@ -321,7 +321,7 @@ def display(self, args):
|
321 | 321 | if max_width <= 0:
|
322 | 322 | raise ValueError(
|
323 | 323 | "max width must be a positive integer")
|
324 |
| - import sage.typeset.character_art as character_art |
| 324 | + from sage.typeset import character_art |
325 | 325 | character_art.MAX_WIDTH = max_width
|
326 | 326 | dm.preferences.text = arg0
|
327 | 327 | # Unset all
|
@@ -478,9 +478,10 @@ def cython(self, line, cell):
|
478 | 478 | ...
|
479 | 479 | ValueError: No closing quotation
|
480 | 480 | """
|
481 |
| - from sage.misc.cython import cython_compile |
482 |
| - import shlex |
483 | 481 | import argparse
|
| 482 | + import shlex |
| 483 | + |
| 484 | + from sage.misc.cython import cython_compile |
484 | 485 |
|
485 | 486 | class ExitCatchingArgumentParser(argparse.ArgumentParser):
|
486 | 487 | def error(self, message):
|
@@ -665,7 +666,7 @@ def init_line_transforms(self):
|
665 | 666 | sage: ip.input_transformer_manager.check_complete(''' # indirect doctest
|
666 | 667 | ....: for i in [1 .. 2]:
|
667 | 668 | ....: a = 2''')
|
668 |
| - ('incomplete', 2) |
| 669 | + ('incomplete', ...) |
669 | 670 | sage: ip.input_transformer_manager.check_complete('''
|
670 | 671 | ....: def foo(L)
|
671 | 672 | ....: K.<a> = L''')
|
@@ -701,7 +702,8 @@ def init_line_transforms(self):
|
701 | 702 | ('incomplete', 4)
|
702 | 703 | """
|
703 | 704 | from IPython.core.inputtransformer2 import TransformerManager
|
704 |
| - from .interpreter import SagePromptTransformer, SagePreparseTransformer |
| 705 | + |
| 706 | + from sage.repl.interpreter import SagePreparseTransformer, SagePromptTransformer |
705 | 707 |
|
706 | 708 | self.shell.input_transformer_manager.cleanup_transforms.insert(1, SagePromptTransformer)
|
707 | 709 | self.shell.input_transformers_post.append(SagePreparseTransformer)
|
|
0 commit comments