MCPcopy Index your code
hub / github.com/AgentOps-AI/agentops / wrapper

Function wrapper

app/api/agentops/common/orm.py:101–112  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

99 def decorator(fn):
100 @wraps(fn)
101 def wrapper(self, *args, **kwargs):
102 state = inspect(self)
103 for field in fields:
104 attr_state = state.attrs.get(field)
105 try:
106 assert attr_state is not None
107 assert hasattr(attr_state, 'loaded_value')
108 assert attr_state.loaded_value is not LoaderCallableStatus.NO_VALUE
109 except AssertionError:
110 raise RuntimeError(f"relationship '{field}' not loaded for {self.__class__.__name__}")
111
112 return fn(self, *args, **kwargs)
113
114 return wrapper
115

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…