MCPcopy Index your code
hub / github.com/python/cpython / _check_signature

Function _check_signature

Lib/unittest/mock.py:129–138  ·  view source on GitHub ↗
(func, mock, skipfirst, instance=False)

Source from the content-addressed store, hash-verified

127
128
129def _check_signature(func, mock, skipfirst, instance=False):
130 sig = _get_signature_object(func, instance, skipfirst)
131 if sig is None:
132 return
133 func, sig = sig
134 def checksig(self, /, *args, **kwargs):
135 sig.bind(*args, **kwargs)
136 _copy_func_details(func, checksig)
137 type(mock)._mock_check_sig = checksig
138 type(mock).__signature__ = sig
139
140
141def _copy_func_details(func, funcopy):

Callers 1

create_autospecFunction · 0.85

Calls 2

_get_signature_objectFunction · 0.85
_copy_func_detailsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…