()
| 17 | |
| 18 | |
| 19 | def _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 | |
| 29 | def _iter_frames(index: int = 1) -> Iterator[FrameType]: |
no test coverage detected