MCPcopy Index your code
hub / github.com/ipython/ipython / get_stack

Method get_stack

IPython/core/debugger.py:378–383  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

376 return super().set_trace(frame, **kwargs)
377
378 def get_stack(self, *args, **kwargs):
379 stack, pos = super().get_stack(*args, **kwargs)
380 if len(stack) >= 0 and self._is_internal_frame(stack[0][0]):
381 stack.pop(0)
382 pos -= 1
383 return stack, pos
384
385 def _is_internal_frame(self, frame):
386 """Determine if this frame should be skipped as internal"""

Calls 2

_is_internal_frameMethod · 0.95
popMethod · 0.80