Coverage for /home/tbone/.local/share/hatch/env/virtual/importnb-aVRh-lqt/test-legacy.stdlib/lib/python3.9/site-packages/importnb/__init__.py: 86%

1# coding: utf-8

2

3 __all__ = "Notebook", "reload"

4

5 def is_ipython():

6 from sys import modules

7

8 return "IPython" in modules

9

10 def 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

22

23 from ._version import *

24 from .ipython_extension import load_ipython_extension, unload_ipython_extension

25 from .loader import Notebook, reload

26

27 import builtins

28 builtins.true, builtins.false, builtins.null = True, False, None

29

30