MCPcopy Index your code
hub / github.com/ZeroIntensity/pointers.py / _make_func_params

Function _make_func_params

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

Source from the content-addressed store, hash-verified

14
15
16def _make_func_params(
17 func: Callable[P, Any],
18 args: Tuple[Any, ...],
19 kwargs: Dict[str, Any],
20) -> Tuple[Dict[str, Any], Dict[str, Any]]:
21 hints = get_type_hints(func, include_extras=True)
22 actual: dict = {}
23 params = inspect.signature(func).parameters
24
25 for index, key in enumerate(params):
26 if key in kwargs:
27 actual[key] = kwargs[key]
28 else:
29 with suppress(IndexError):
30 actual[params[key].name] = args[index]
31
32 return (hints, actual)
33
34
35def _decay_params(

Callers 2

_decay_paramsFunction · 0.85
wrappedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected