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

Function _signature_from_builtin

Lib/inspect.py:2291–2304  ·  view source on GitHub ↗

Private helper function to get signature for builtin callables.

(cls, func, skip_bound_arg=True)

Source from the content-addressed store, hash-verified

2289
2290
2291def _signature_from_builtin(cls, func, skip_bound_arg=True):
2292 """Private helper function to get signature for
2293 builtin callables.
2294 """
2295
2296 if not _signature_is_builtin(func):
2297 raise TypeError("{!r} is not a Python builtin "
2298 "function".format(func))
2299
2300 s = getattr(func, "__text_signature__", None)
2301 if not s:
2302 raise ValueError("no signature found for builtin {!r}".format(func))
2303
2304 return _signature_fromstr(cls, func, s, skip_bound_arg)
2305
2306
2307def _signature_from_function(cls, func, skip_bound_arg=True,

Callers 1

_signature_from_callableFunction · 0.85

Calls 4

_signature_is_builtinFunction · 0.85
getattrFunction · 0.85
_signature_fromstrFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected