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

Function _callable

Lib/unittest/mock.py:153–160  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

151
152
153def _callable(obj):
154 if isinstance(obj, type):
155 return True
156 if isinstance(obj, (staticmethod, classmethod, MethodType)):
157 return _callable(obj.__func__)
158 if getattr(obj, '__call__', None) is not None:
159 return True
160 return False
161
162
163def _is_list(obj):

Callers 10

test_typeMethod · 0.90
test_staticmethodMethod · 0.90
test_classmethodMethod · 0.90
_try_iterFunction · 0.85
_execute_mock_callMethod · 0.85
_execute_mock_callMethod · 0.85
create_autospecFunction · 0.85

Calls 2

isinstanceFunction · 0.85
getattrFunction · 0.85

Tested by 6

test_typeMethod · 0.72
test_staticmethodMethod · 0.72
test_classmethodMethod · 0.72