Coverage for /home/runner/.local/share/hatch/env/virtual/importnb/KA2AwMZG/test.stdlib/lib/python3.9/site-packages/importnb/__init__.py: 56%

1# coding: utf-8

2

3 __all__ = "Notebook", "reload", "imports" 5 ctx 1adbce

4

5

6 def is_ipython(): 5 ctx 1adbce

7 from sys import modules

8

9 return "IPython" in modules

10

11

12 def get_ipython(force=True): 5 ctx 1adbce

13 if force or is_ipython(): 13 ↛ 24line 13 didn't jump to line 24, because the condition on line 13 was never false 16 ctx 1fabcghijklmnopqr

14 try: 16 ctx 1fabcghijklmnopqr

15 from IPython import get_ipython 16 ctx 1fabcghijklmnopqr

16 except ModuleNotFoundError: 16 ctx 1fabcghijklmnopqr

17 return 16 ctx 1fabcghijklmnopqr

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 5 ctx 1adbce

28

29 from ._version import __version__ 5 ctx 1adbce

30 from .loader import Notebook, reload 5 ctx 1adbce

31 from .entry_points import imports 5 ctx 1adbce

32

33 builtins.true, builtins.false, builtins.null = True, False, None 5 ctx 1adbce