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

Method do_context

IPython/core/debugger.py:1373–1386  ·  view source on GitHub ↗

context number_of_lines Set the number of lines of source code to show when displaying stacktrace information.

(self, context: str)

Source from the content-addressed store, hash-verified

1371 self._show_ignored_modules()
1372
1373 def do_context(self, context: str):
1374 """context number_of_lines
1375 Set the number of lines of source code to show when displaying
1376 stacktrace information.
1377 """
1378 try:
1379 new_context = int(context)
1380 if new_context <= 0:
1381 raise ValueError()
1382 self.context = new_context
1383 except ValueError:
1384 self.error(
1385 f"The 'context' command requires a positive integer argument (current value {self.context})."
1386 )
1387
1388
1389class InterruptiblePdb(Pdb):

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected