MCPcopy Create free account
hub / github.com/ZeroIntensity/pointers.py / _decay_params

Function _decay_params

src/pointers/decay.py:35–46  ·  view source on GitHub ↗
(
    func: Callable[..., Any],
    args: Tuple[Any, ...],
    kwargs: Dict[str, Any],
)

Source from the content-addressed store, hash-verified

33
34
35def _decay_params(
36 func: Callable[..., Any],
37 args: Tuple[Any, ...],
38 kwargs: Dict[str, Any],
39) -> Dict[str, Any]:
40 hints, actual = _make_func_params(func, args, kwargs)
41
42 for key, value in hints.items():
43 if (get_origin(value) is Pointer) or (value is Pointer):
44 actual[key] = to_ptr(actual[key])
45
46 return actual
47
48
49def decay(func: Callable[P, T]) -> Callable[..., T]:

Callers 2

innerFunction · 0.85
wrappedFunction · 0.85

Calls 3

_make_func_paramsFunction · 0.85
to_ptrFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected