MCPcopy Create free account
hub / github.com/dask/dask / normalize_callback

Function normalize_callback

dask/callbacks.py:110–117  ·  view source on GitHub ↗

Normalizes a callback to a tuple

(cb)

Source from the content-addressed store, hash-verified

108
109
110def normalize_callback(cb):
111 """Normalizes a callback to a tuple"""
112 if isinstance(cb, Callback):
113 return cb._callback
114 elif isinstance(cb, tuple):
115 return cb
116 else:
117 raise TypeError("Callbacks must be either `Callback` or `tuple`")
118
119
120class add_callbacks:

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected