MCPcopy
hub / github.com/celery/celery / maybe_evaluate

Function maybe_evaluate

celery/local.py:352–357  ·  view source on GitHub ↗

Attempt to evaluate promise, even if obj is not a promise.

(obj)

Source from the content-addressed store, hash-verified

350
351
352def maybe_evaluate(obj):
353 """Attempt to evaluate promise, even if obj is not a promise."""
354 try:
355 return obj.__maybe_evaluate__()
356 except AttributeError:
357 return obj
358
359
360# ############# Module Generation ##########################

Callers 7

test_maybe_evaluateMethod · 0.90
finalizeMethod · 0.90
_load_configMethod · 0.90
test_prepareMethod · 0.85
__init__Method · 0.85
_matcherFunction · 0.85
query_routerMethod · 0.85

Calls 1

__maybe_evaluate__Method · 0.80

Tested by 2

test_maybe_evaluateMethod · 0.72
test_prepareMethod · 0.68