Skip to content

Commit

Permalink
Update qtconsole/mainwindow.py
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Althviz Moré <[email protected]>
  • Loading branch information
jsbautista and dalthviz authored Jun 25, 2024
1 parent 7a1a34c commit 2e752c6
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 2e752c6

Please sign in to comment.