File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 44
55import os , sys , warnings
66from IPython .core .interactiveshell import InteractiveShell , InteractiveShellABC
7+ from IPython .core .history import HistoryAccessorBase
78from IPython .core .autocall import ZMQExitAutocall
89from IPython .core .magic import magics_class , line_magic , Magics
910from IPython .utils .process import system
@@ -30,12 +31,21 @@ def man(self, arg_s): pass
3031 @line_magic
3132 def autosave (self , arg_s ): pass
3233
34+ def noop (* args , ** kwargs ): return args
35+
36+ class DummyHistory (HistoryAccessorBase ):
37+ def __init__ (self , * args , ** kw ): self .enabled = False
38+ def __getattr__ (self , k ): return noop
39+ _log_validate = False
40+
3341class FastInteractiveShell (InteractiveShell ):
3442 data_pub_class = Any ()
35- #kernel = Any()
3643 parent_header = Any ()
3744 exiter = Instance (ZMQExitAutocall )
3845
46+ def init_history (self ): self .history_manager = DummyHistory ()
47+ def atexit_operations (self , * args , ** kwargs ): pass
48+
3949 @default ('exiter' )
4050 def _default_exiter (self ): return ZMQExitAutocall (self )
4151
You can’t perform that action at this time.
0 commit comments