MCPcopy Create free account
hub / github.com/apache/fory / _is_local_callable

Function _is_local_callable

python/pyfory/serializer.py:85–94  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

83
84
85def _is_local_callable(obj):
86 if isinstance(obj, type):
87 return _is_local_class(obj)
88 if isinstance(obj, (types.MethodType, types.BuiltinMethodType)):
89 receiver = getattr(obj, "__self__", None)
90 if receiver is not None and not inspect.ismodule(receiver):
91 return _is_local_receiver(receiver)
92 module_name = getattr(obj, "__module__", "")
93 qualname = getattr(obj, "__qualname__", getattr(obj, "__name__", ""))
94 return _is_local_qualname(module_name, qualname)
95
96
97def _is_bound_method_value(obj):

Callers 3

_deserialize_functionMethod · 0.85
readMethod · 0.85

Calls 3

_is_local_classFunction · 0.85
_is_local_receiverFunction · 0.85
_is_local_qualnameFunction · 0.85

Tested by

no test coverage detected