MCPcopy Index your code
hub / github.com/RustPython/RustPython / _is_internal_frame

Function _is_internal_frame

Lib/logging/__init__.py:197–202  ·  view source on GitHub ↗

Signal whether the frame is a CPython or logging module internal.

(frame)

Source from the content-addressed store, hash-verified

195# frames of the import mechanism are skipped when logging at module level and
196# using a stacklevel value greater than one.
197def _is_internal_frame(frame):
198 """Signal whether the frame is a CPython or logging module internal."""
199 filename = os.path.normcase(frame.f_code.co_filename)
200 return filename == _srcfile or (
201 "importlib" in filename and "_bootstrap" in filename
202 )
203
204
205def _checkLevel(level):

Callers 1

findCallerMethod · 0.70

Calls 1

normcaseMethod · 0.80

Tested by

no test coverage detected