MCPcopy Index your code
hub / github.com/RustPython/RustPython / _resolve

Function _resolve

crates/wasm/Lib/asyncweb.py:71–77  ·  view source on GitHub ↗
(prom)

Source from the content-addressed store, hash-verified

69
70
71def _resolve(prom):
72 if is_promise(prom):
73 return prom
74 elif isinstance(prom, Coroutine):
75 return _coro_promise(prom)
76 else:
77 return Promise.resolve(prom)
78
79
80class CallbackPromise:

Callers 2

_call_resolveFunction · 0.70
register_promiseFunction · 0.70

Calls 4

is_promiseFunction · 0.85
isinstanceFunction · 0.85
_coro_promiseFunction · 0.85
resolveMethod · 0.45

Tested by

no test coverage detected