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

Method prepare_header

IPython/core/doctb.py:240–252  ·  view source on GitHub ↗
(self, etype: str)

Source from the content-addressed store, hash-verified

238 return result
239
240 def prepare_header(self, etype: str) -> str:
241 width = min(75, get_terminal_size()[0])
242 head = theme_table[self._theme_name].format(
243 [
244 (
245 Token,
246 "Traceback (most recent call last):",
247 ),
248 (Token, " "),
249 ]
250 )
251
252 return head
253
254 def format_exception(self, etype: Any, evalue: Any) -> Any:
255 # Get (safely) a string form of the exception info

Callers 1

Calls 2

get_terminal_sizeFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected