mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2025-02-16 13:28:29 +00:00
setup rich tracebacks width properly in monkey patched exception handler
This commit is contained in:
parent
ee5bec6a10
commit
2fd837f254
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
__package__ = 'archivebox'
|
||||
|
||||
import django
|
||||
import pydantic
|
||||
import shutil
|
||||
|
||||
import django_stubs_ext
|
||||
|
||||
django_stubs_ext.monkeypatch()
|
||||
|
@ -19,7 +23,7 @@ timezone.utc = datetime.timezone.utc
|
|||
# https://rich.readthedocs.io/en/stable/traceback.html#traceback-handler
|
||||
from rich.traceback import install
|
||||
|
||||
install(show_locals=True)
|
||||
install(show_locals=True, word_wrap=False, locals_max_length=10, locals_hide_dunder=True, suppress=[django, pydantic], extra_lines=2, width=shutil.get_terminal_size((100, 10)).columns - 1)
|
||||
|
||||
|
||||
from daphne import access
|
||||
|
|
Loading…
Add table
Reference in a new issue