MCPcopy
hub / github.com/dask/dask / GlobalMethod

Class GlobalMethod

dask/context.py:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57class GlobalMethod:
58 def __init__(self, default, key, falsey=None):
59 self._default = default
60 self._key = key
61 self._falsey = falsey
62
63 def __get__(self, instance, owner=None):
64 if self._key in _globals:
65 if _globals[self._key]:
66 return _globals[self._key]
67 elif self._falsey is not None:
68 return self._falsey
69 return self._default

Callers 1

globalmethodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…