MCPcopy Create free account
hub / github.com/bytedance/bolt / pyTypeStr

Function pyTypeStr

bolt/python/Utils.cpp:109–112  ·  view source on GitHub ↗

Get object name/type as string without error handling.

Source from the content-addressed store, hash-verified

107
108// Get object name/type as string without error handling.
109std::string pyTypeStr(const pybind11::object& obj) {
110 return pyTry<std::string>(
111 [&]() { return obj.attr("__name__").cast<pybind11::str>(); });
112}
113
114std::string pyInstanceTypeStr(const pybind11::object& obj) {
115 return pyTry<std::string>([&]() { return pyTypeStr(obj.attr("__class__")); });

Callers 5

applyMethod · 0.85
initAggregatorFunction · 0.85
aggregateFunction · 0.85
pyInstanceTypeStrFunction · 0.85
toStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected