Private helper to test if `obj` is a callable that might support Argument Clinic's __text_signature__ protocol.
(obj)
| 2062 | |
| 2063 | |
| 2064 | def _signature_is_builtin(obj): |
| 2065 | """Private helper to test if `obj` is a callable that might |
| 2066 | support Argument Clinic's __text_signature__ protocol. |
| 2067 | """ |
| 2068 | return (isbuiltin(obj) or |
| 2069 | ismethoddescriptor(obj) or |
| 2070 | isinstance(obj, _NonUserDefinedCallables) or |
| 2071 | # Can't test 'isinstance(type)' here, as it would |
| 2072 | # also be True for regular python classes. |
| 2073 | # Can't use the `in` operator here, as it would |
| 2074 | # invoke the custom __eq__ method. |
| 2075 | obj is type or obj is object) |
| 2076 | |
| 2077 | |
| 2078 | def _signature_is_functionlike(obj): |
no test coverage detected
searching dependent graphs…