MCPcopy Create free account
hub / github.com/LabPy/lantz / to_callable

Method to_callable

lantz/processors.py:266–272  ·  view source on GitHub ↗
(cls, obj)

Source from the content-addressed store, hash-verified

264
265 @classmethod
266 def to_callable(cls, obj):
267 if isinstance(obj, dict):
268 return get_mapping(obj)
269 if isinstance(obj, set):
270 return check_membership(obj)
271 raise TypeError('MapProcessor argument must be a dict or a callable, '
272 'not {}'.format(obj))
273
274
275class ReverseMapProcessor(Processor):

Callers

nothing calls this directly

Calls 2

get_mappingFunction · 0.85
check_membershipFunction · 0.85

Tested by

no test coverage detected