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

Method setup

Lib/pdb.py:215–230  ·  view source on GitHub ↗
(self, f, tb)

Source from the content-addressed store, hash-verified

213 self.tb_lineno.clear()
214
215 def setup(self, f, tb):
216 self.forget()
217 self.stack, self.curindex = self.get_stack(f, tb)
218 while tb:
219 # when setting up post-mortem debugging with a traceback, save all
220 # the original line numbers to be displayed along the current line
221 # numbers (which can be different, e.g. due to finally clauses)
222 lineno = lasti2lineno(tb.tb_frame.f_code, tb.tb_lasti)
223 self.tb_lineno[tb.tb_frame] = lineno
224 tb = tb.tb_next
225 self.curframe = self.stack[self.curindex][0]
226 # The f_locals dictionary is updated from the actual frame
227 # locals whenever the .f_locals accessor is called, so we
228 # cache it here to ensure that modifications are not overwritten.
229 self.curframe_locals = self.curframe.f_locals
230 return self.execRcLines()
231
232 # Can be executed earlier than 'setup' if desired
233 def execRcLines(self):

Callers 3

bp_commandsMethod · 0.95
interactionMethod · 0.95
import_pypi.pyFile · 0.45

Calls 4

forgetMethod · 0.95
execRcLinesMethod · 0.95
lasti2linenoFunction · 0.85
get_stackMethod · 0.45

Tested by

no test coverage detected