Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/dask/widgets/__init__.py: 83%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

12 statements  

1from __future__ import annotations 

2 

3try: 

4 from dask.widgets.widgets import ( 

5 FILTERS, 

6 TEMPLATE_PATHS, 

7 get_environment, 

8 get_template, 

9 ) 

10 

11except ImportError as e: 

12 msg = ( 

13 "Dask diagnostics requirements are not installed.\n\n" 

14 "Please either conda or pip install as follows:\n\n" 

15 " conda install dask # either conda install\n" 

16 ' python -m pip install "dask[diagnostics]" --upgrade # or python -m pip install' 

17 ) 

18 exception = e # Explicit reference for e as it will be lost outside the try block 

19 FILTERS = {} 

20 TEMPLATE_PATHS = [] 

21 

22 def get_environment(): 

23 raise ImportError(msg) from exception 

24 

25 def get_template(name: str): 

26 raise ImportError(msg) from exception