Skip to content

Commit

Permalink
Merge branch 'HighlightTracebacks' of https://github.com/jsbautista/q…
Browse files Browse the repository at this point in the history
…tconsole into HighlightTracebacks
  • Loading branch information
jsbautista committed Jun 25, 2024
2 parents ff43880 + 2e752c6 commit f7bbaa0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qtconsole/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,11 @@ def set_syntax_style(self, syntax_style):
self.active_frontend._execute(
f"""
from IPython.core.ultratb import VerboseTB
try:
if getattr(VerboseTB, 'tb_highlight_style', None) is not None:
VerboseTB.tb_highlight_style = '{syntax_style}'
elif getattr(VerboseTB, '_tb_highlight_style', None) is not None:
VerboseTB._tb_highlight_style = '{syntax_style}'
except AttributeError:
else:
get_ipython().run_line_magic('colors', '{colors}')
""",
True)
Expand Down

0 comments on commit f7bbaa0

Please sign in to comment.