diff --git a/IPython/core/magics/__init__.py b/IPython/core/magics/__init__.py index a6c5f47..fa820b6 100644 --- a/IPython/core/magics/__init__.py +++ b/IPython/core/magics/__init__.py @@ -1,36 +1,39 @@ """Implementation of all the magic functions built into IPython. """ -#----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- - -from ..magic import Magics, magics_class -from .auto import AutoMagics -from .basic import BasicMagics, AsyncMagics -from .code import CodeMagics, MacroToEdit -from .config import ConfigMagics -from .display import DisplayMagics -from .execution import ExecutionMagics -from .extension import ExtensionMagics -from .history import HistoryMagics -from .logging import LoggingMagics -from .namespace import NamespaceMagics -from .osm import OSMagics -from .packaging import PackagingMagics -from .pylab import PylabMagics -from .script import ScriptMagics - -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + +from ..magic import Magics as Magics, magics_class as magics_class +from .auto import AutoMagics as AutoMagics +from .basic import BasicMagics as BasicMagics, AsyncMagics as AsyncMagics +from .code import CodeMagics as CodeMagics, MacroToEdit as MacroToEdit +from .config import ConfigMagics as ConfigMagics +from .display import DisplayMagics as DisplayMagics +from .execution import ExecutionMagics as ExecutionMagics +from .extension import ExtensionMagics as ExtensionMagics +from .history import HistoryMagics as HistoryMagics +from .logging import LoggingMagics as LoggingMagics +from .namespace import NamespaceMagics as NamespaceMagics +from .osm import OSMagics as OSMagics +from .packaging import PackagingMagics as PackagingMagics +from .pylab import PylabMagics as PylabMagics +from .script import ScriptMagics as ScriptMagics + + +# ----------------------------------------------------------------------------- # Magic implementation classes -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + @magics_class class UserMagics(Magics): diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index 646d1f7..bcaf36d 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -21,25 +21,16 @@ import time import timeit from typing import Dict, Any from ast import ( - Assign, - Call, - Expr, - Load, Module, - Name, - NodeTransformer, - Store, - parse, - unparse, ) from io import StringIO from logging import error from pathlib import Path from pdb import Restart -from textwrap import dedent, indent +from textwrap import indent from warnings import warn -from IPython.core import magic_arguments, oinspect, page +from IPython.core import magic_arguments, page from IPython.core.displayhook import DisplayHook from IPython.core.error import UsageError from IPython.core.macro import Macro