Coverage for /home/tbone/.local/share/hatch/env/virtual/importnb-aVRh-lqt/released.interactive/lib/python3.9/site-packages/importnb/__init__.py: 75%

1# coding: utf-8

2

3 __all__ = "Notebook", "reload"

4

5

6 def is_ipython():

7 from sys import modules

8

9 return "IPython" in modules

10

11

12 def get_ipython(force=True):

13 if force or is_ipython():

14 try:

15 from IPython import get_ipython

16 except ModuleNotFoundError:

17 return

18 shell = get_ipython()

19 if shell is None:

20 from IPython import InteractiveShell

21

22 shell = InteractiveShell.instance()

23 return shell

24 return None

25

26

27 import builtins

28

29 from ._version import __version__

30 from .loader import Notebook, reload

31

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