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

21 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-11-02 04:03 +0000

1# coding: utf-8 

2 

3__all__ = "Notebook", "reload", "imports" 1aebcfd

4 

5 

6def is_ipython(): 1aebcfd

7 from sys import modules 

8 

9 return "IPython" in modules 

10 

11 

12def get_ipython(force=True): 1aebcfd

13 if force or is_ipython(): 13 ↛ 24line 13 didn't jump to line 24, because the condition on line 13 was never false1gabchdijklmnopqrst

14 try: 1gabchdijklmnopqrst

15 from IPython import get_ipython 1gabchdijklmnopqrst

16 except ModuleNotFoundError: 

17 return 

18 shell = get_ipython() 1gabchdijklmnopqrst

19 if shell is None: 1gabchdijklmnopqrst

20 from IPython import InteractiveShell 1gabc

21 

22 shell = InteractiveShell.instance() 1gabc

23 return shell 1gabchdijklmnopqrst

24 return None 

25 

26 

27import builtins 1aebcfd

28 

29from ._version import __version__ 1aebcfd

30from .loader import Notebook, reload 1aebcfd

31from .entry_points import imports 1aebcfd

32 

33builtins.true, builtins.false, builtins.null = True, False, None 1aebcfd