From 3e1a067724ad44f8db936bd9a8b778a8d9574b46 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sat, 25 Feb 2023 11:53:44 +0000 Subject: [PATCH] Override the default traceback with rich traceback --- devine/core/__main__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/devine/core/__main__.py b/devine/core/__main__.py index 8e7ecb5..4120044 100644 --- a/devine/core/__main__.py +++ b/devine/core/__main__.py @@ -7,6 +7,7 @@ from pathlib import Path import click import urllib3 from urllib3.exceptions import InsecureRequestWarning +from rich import traceback from rich.padding import Padding from devine.core import __version__ @@ -47,6 +48,12 @@ def main(version: bool, debug: bool, log_path: Path) -> None: urllib3.disable_warnings(InsecureRequestWarning) + traceback.install( + console=console, + width=80, + suppress=[click] + ) + console.print( Padding( textwrap.dedent(