mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Use optional rich dependency to render tracebacks, closes #1416
This commit is contained in:
parent
a679d0de87
commit
54b6e96ee8
3 changed files with 17 additions and 0 deletions
|
|
@ -31,6 +31,14 @@ from .utils.sqlite import sqlite3
|
|||
from .utils.testing import TestClient
|
||||
from .version import __version__
|
||||
|
||||
# Use Rich for tracebacks if it is installed
|
||||
try:
|
||||
from rich.traceback import install
|
||||
|
||||
install(show_locals=True)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
class Config(click.ParamType):
|
||||
# This will be removed in Datasette 1.0 in favour of class Setting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue