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

Function _with_offset

dask/order.py:282–296  ·  view source on GitHub ↗
(func: Callable[..., None])

Source from the content-addressed store, hash-verified

280 runnable.append(dep)
281
282 def _with_offset(func: Callable[..., None]) -> Callable[..., None]:
283 # This decorator is only used to reduce indentation levels. The offset
284 # is purely cosmetical and used for some visualizations and I haven't
285 # settled on how to implement this best so I didn't want to have large
286 # indentations that make things harder to read
287
288 def wrapper(*args: Any, **kwargs: Any) -> None:
289 nonlocal _crit_path_counter_offset
290 _crit_path_counter_offset = 0.5
291 try:
292 func(*args, **kwargs)
293 finally:
294 _crit_path_counter_offset = 0
295
296 return wrapper
297
298 @_with_offset
299 def process_runnables() -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected