From 4c855f4e60cacfb74e9417e07366c8ad49493f36 2022-09-12 19:26:00 From: Matthias Bussonnier Date: 2022-09-12 19:26:00 Subject: [PATCH] Quick hack to make tb highlighting configurable. For example put from IPython.core.ultratb import VerboseTB VerboseTB._tb_highlight = "bg:#039dfc" In your ipython_config.py Mitigate #13446 and #13486 --- diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 125ee9a..8f40c63 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -610,6 +610,8 @@ class VerboseTB(TBTools): traceback, to be used with alternate interpreters (because their own code would appear in the traceback).""" + _tb_highlight = "bg:ansiyellow" + def __init__( self, color_scheme: str = "Linux", @@ -836,7 +838,7 @@ class VerboseTB(TBTools): before = context - after if self.has_colors: style = get_style_by_name("default") - style = stack_data.style_with_executing_node(style, "bg:ansiyellow") + style = stack_data.style_with_executing_node(style, self._tb_highlight) formatter = Terminal256Formatter(style=style) else: formatter = None