Skip to content

Commit

Permalink
fix: traceback colours (#25356)
Browse files Browse the repository at this point in the history
default ipython colours use yellow on white font, which looks horrible
and is practically unreadable on most colourschemes.

(cherry picked from commit 59f421c)
  • Loading branch information
ankush authored and mergify[bot] committed Mar 12, 2024
1 parent 785b5c2 commit b6d2785
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frappe/commands/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,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()
Expand Down

0 comments on commit b6d2785

Please sign in to comment.