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

Method __init__

IPython/core/tbtools.py:313–341  ·  view source on GitHub ↗
(
        self,
        description: Optional[str],
        filename: str,
        lineno: int,
        frame: Any,
        code: Optional[types.CodeType],
        *,
        sd: Any = None,
        context: int | None = None,
    )

Source from the content-addressed store, hash-verified

311 )
312
313 def __init__(
314 self,
315 description: Optional[str],
316 filename: str,
317 lineno: int,
318 frame: Any,
319 code: Optional[types.CodeType],
320 *,
321 sd: Any = None,
322 context: int | None = None,
323 ):
324 assert isinstance(lineno, (int, type(None))), lineno
325 self.description = description
326 self.filename = filename
327 self.lineno = lineno
328 self.frame = frame
329 self.code = code
330 self._sd = sd
331 self.context = context
332
333 # self.lines = []
334 if sd is None:
335 try:
336 # return a list of source lines and a starting line number
337 self.raw_lines = inspect.getsourcelines(frame)[0]
338 except OSError:
339 self.raw_lines = [
340 "'Could not get source, probably due dynamically evaluated source code.'"
341 ]
342
343 @property
344 def variables_in_executing_piece(self) -> list[Any]:

Callers

nothing calls this directly

Calls 1

getsourcelinesMethod · 0.80

Tested by

no test coverage detected