def __init__( self, frame_or_tb: Union[FrameType, TracebackType], options: Optional[Options] = None, ): self.executing = Source.executing(frame_or_tb) frame, self.lineno = frame_and_lineno(frame_or_tb) self.frame = frame self.code = frame.f_code self.options = options or Options() # type: Options self.source = self.executing.source # type: Source
def _frame_key(x): frame, lineno = frame_and_lineno(x) return frame.f_code, lineno