Private helper function to get signature for builtin callables.
(cls, func, skip_bound_arg=True)
| 2295 | |
| 2296 | |
| 2297 | def _signature_from_builtin(cls, func, skip_bound_arg=True): |
| 2298 | """Private helper function to get signature for |
| 2299 | builtin callables. |
| 2300 | """ |
| 2301 | |
| 2302 | if not _signature_is_builtin(func): |
| 2303 | raise TypeError("{!r} is not a Python builtin " |
| 2304 | "function".format(func)) |
| 2305 | |
| 2306 | s = getattr(func, "__text_signature__", None) |
| 2307 | if not s: |
| 2308 | raise ValueError("no signature found for builtin {!r}".format(func)) |
| 2309 | |
| 2310 | return _signature_fromstr(cls, func, s, skip_bound_arg) |
| 2311 | |
| 2312 | |
| 2313 | def _signature_from_function(cls, func, skip_bound_arg=True, |
no test coverage detected
searching dependent graphs…