Coverage for /home/tbone/.local/share/hatch/env/virtual/importnb-aVRh-lqt/test-legacy.stdlib/lib/python3.9/site-packages/importnb/__init__.py: 86%
21 statements
« prev ^ index » next coverage.py v6.5.0, created at 2022-10-03 10:53 -0700
« prev ^ index » next coverage.py v6.5.0, created at 2022-10-03 10:53 -0700
1# coding: utf-8
3__all__ = "Notebook", "reload"
5def is_ipython():
6 from sys import modules
8 return "IPython" in modules
10def get_ipython(force=True):
11 if force or is_ipython():
12 try:
13 from IPython import get_ipython
14 except ModuleNotFoundError:
15 return
16 shell = get_ipython()
17 if shell is None:
18 from IPython import InteractiveShell
19 shell = InteractiveShell.instance()
20 return shell
21 return None
23from ._version import *
24from .ipython_extension import load_ipython_extension, unload_ipython_extension
25from .loader import Notebook, reload
27import builtins
28builtins.true, builtins.false, builtins.null = True, False, None