MCPcopy Index your code
hub / github.com/reactive-python/reactpy / wrapper

Method wrapper

src/py/reactpy/reactpy/testing/common.py:141–150  ·  view source on GitHub ↗
(*args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

139
140 @wraps(render_function)
141 def wrapper(*args: Any, **kwargs: Any) -> Any:
142 self = self_ref()
143 if self is None:
144 raise RuntimeError("Hook catcher has been garbage collected")
145
146 hook = current_hook()
147 if self.index_by_kwarg is not None:
148 self.index[kwargs[self.index_by_kwarg]] = hook
149 self.latest = hook
150 return render_function(*args, **kwargs)
151
152 return wrapper
153

Callers

nothing calls this directly

Calls 1

current_hookFunction · 0.90

Tested by

no test coverage detected