MCPcopy
hub / github.com/psycopg/psycopg / get_maker

Method get_maker

tests/fix_faker.py:265–277  ·  view source on GitHub ↗
(self, spec)

Source from the content-addressed store, hash-verified

263 return meth(cls) if meth else cls
264
265 def get_maker(self, spec):
266 cls = spec if isinstance(spec, type) else spec[0]
267
268 try:
269 return self._makers[cls]
270 except KeyError:
271 pass
272
273 if meth := self._get_method("make", cls):
274 self._makers[cls] = meth
275 return meth
276 else:
277 raise NotImplementedError(f"cannot make fake objects of class {cls}")
278
279 def get_matcher(self, spec):
280 cls = spec if isinstance(spec, type) else spec[0]

Callers 2

get_supported_typesMethod · 0.95
makeMethod · 0.95

Calls 1

_get_methodMethod · 0.95

Tested by

no test coverage detected