From ea2fce1fbb2749e8ad8ffe2f95015f7c346d8e0f 2024-10-01 07:39:08 From: M Bussonnier Date: 2024-10-01 07:39:08 Subject: [PATCH] [PR]: Make values public (_tb_highlight & _tb_highlight_style) (#14518) Fixes: #14464 https://github.com/ipython/ipython/issues/14464#issuecomment-2180056302 --- diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 66c9ce9..a8a38f1 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -830,8 +830,8 @@ class VerboseTB(TBTools): traceback, to be used with alternate interpreters (because their own code would appear in the traceback).""" - _tb_highlight = "bg:ansiyellow" - _tb_highlight_style = "default" + tb_highlight = "bg:ansiyellow" + tb_highlight_style = "default" def __init__( self, @@ -1133,8 +1133,8 @@ class VerboseTB(TBTools): after = context // 2 before = context - after if self.has_colors: - style = get_style_by_name(self._tb_highlight_style) - style = stack_data.style_with_executing_node(style, self._tb_highlight) + style = get_style_by_name(self.tb_highlight_style) + style = stack_data.style_with_executing_node(style, self.tb_highlight) formatter = Terminal256Formatter(style=style) else: formatter = None