MCPcopy
hub / github.com/mitmproxy/mitmproxy / verify_arg_signature

Function verify_arg_signature

mitmproxy/command.py:25–30  ·  view source on GitHub ↗
(f: Callable, args: Iterable[Any], kwargs: dict)

Source from the content-addressed store, hash-verified

23
24
25def verify_arg_signature(f: Callable, args: Iterable[Any], kwargs: dict) -> None:
26 sig = inspect.signature(f, eval_str=True)
27 try:
28 sig.bind(*args, **kwargs)
29 except TypeError as v:
30 raise exceptions.CommandError("command argument mismatch: %s" % v.args[0])
31
32
33def typename(t: type) -> str:

Callers 1

wrapperFunction · 0.85

Calls 1

bindMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…