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

Function _frame_depth_in_module

src/py/reactpy/reactpy/_warnings.py:19–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def _frame_depth_in_module() -> int:
20 depth = 0
21 for frame in _iter_frames(2):
22 module_name = frame.f_globals.get("__name__")
23 if not module_name or not module_name.startswith("reactpy."):
24 break
25 depth += 1
26 return depth
27
28
29def _iter_frames(index: int = 1) -> Iterator[FrameType]:

Callers 1

warnFunction · 0.85

Calls 2

_iter_framesFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected