mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	Override the default traceback with rich traceback
This commit is contained in:
		
							parent
							
								
									b8f3118775
								
							
						
					
					
						commit
						3e1a067724
					
				@ -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(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user