MCPcopy Index your code
hub / github.com/python/cpython / _next_external_frame

Function _next_external_frame

Lib/_py_warnings.py:454–461  ·  view source on GitHub ↗

Find the next frame that doesn't involve Python or user internals.

(frame, skip_file_prefixes)

Source from the content-addressed store, hash-verified

452
453
454def _next_external_frame(frame, skip_file_prefixes):
455 """Find the next frame that doesn't involve Python or user internals."""
456 frame = frame.f_back
457 while frame is not None and (
458 _is_internal_filename(filename := frame.f_code.co_filename) or
459 _is_filename_to_skip(filename, skip_file_prefixes)):
460 frame = frame.f_back
461 return frame
462
463
464# Code typically replaced by _warnings

Callers 1

warnFunction · 0.85

Calls 2

_is_internal_filenameFunction · 0.85
_is_filename_to_skipFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…