MCPcopy
hub / github.com/dask/dask / import_required

Function import_required

dask/utils.py:322–330  ·  view source on GitHub ↗

Attempt to import a required dependency. Raises a RuntimeError if the requested module is not available.

(mod_name, error_msg)

Source from the content-addressed store, hash-verified

320
321
322def import_required(mod_name, error_msg):
323 """Attempt to import a required dependency.
324
325 Raises a RuntimeError if the requested module is not available.
326 """
327 try:
328 return import_module(mod_name)
329 except ImportError as e:
330 raise RuntimeError(error_msg) from e
331
332
333@contextmanager

Callers 15

to_graphvizFunction · 0.90
cytoscape_graphFunction · 0.90
to_graphvizFunction · 0.90
_to_graphvizMethod · 0.90
make_peopleFunction · 0.90
read_avroFunction · 0.90
to_avroFunction · 0.90
_metaMethod · 0.90
analyzeFunction · 0.90
explainFunction · 0.90
get_engineFunction · 0.90
get_colorsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…