fix: traceback colours (#25356)

default ipython colours use yellow on white font, which looks horrible
and is practically unreadable on most colourschemes.
This commit is contained in:
Ankush Menat 2024-03-12 15:52:18 +05:30 committed by GitHub
parent 4963a7e2b2
commit 59f421cd04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -619,6 +619,14 @@ def console(context, autoreload=False):
if failed_to_import:
print("\nFailed to import:\n{}".format(", ".join(failed_to_import)))
# ref: https://stackoverflow.com/a/74681224
try:
from IPython.core import ultratb
ultratb.VerboseTB._tb_highlight = "bg:ansibrightblack"
except Exception:
pass
terminal.colors = "neutral"
terminal.display_banner = False
terminal()