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

Method _hidden_predicate

IPython/core/debugger.py:398–417  ·  view source on GitHub ↗

Given a frame return whether it it should be hidden or not by IPython.

(self, frame)

Source from the content-addressed store, hash-verified

396 return False
397
398 def _hidden_predicate(self, frame):
399 """
400 Given a frame return whether it it should be hidden or not by IPython.
401 """
402
403 if self._predicates["readonly"]:
404 fname = frame.f_code.co_filename
405 # we need to check for file existence and interactively define
406 # function would otherwise appear as RO.
407 if os.path.isfile(fname) and not os.access(fname, os.W_OK):
408 return True
409
410 if self._predicates["tbhide"]:
411 if frame in (self.curframe, getattr(self, "initial_frame", None)):
412 return False
413 frame_locals = self._get_frame_locals(frame)
414 if "__tracebackhide__" not in frame_locals:
415 return False
416 return frame_locals["__tracebackhide__"]
417 return False
418
419 def hidden_frames(self, stack):
420 """

Callers 2

hidden_framesMethod · 0.95
stop_hereMethod · 0.95

Calls 1

_get_frame_localsMethod · 0.95

Tested by

no test coverage detected