chore: correct package issues

This commit is contained in:
Benexl
2025-08-16 19:08:39 +03:00
parent 99c67a4bc0
commit 5976ab43b2
246 changed files with 96 additions and 96 deletions

View File

@@ -0,0 +1,24 @@
import sys
from rich.traceback import install as rich_install
def custom_exception_hook(exc_type, exc_value, exc_traceback):
print(f"{exc_type.__name__}: {exc_value}")
default_exception_hook = sys.excepthook
def setup_exceptions_handler(
trace: bool | None,
dev: bool | None,
rich_traceback: bool | None,
rich_traceback_theme: str,
):
if trace or dev:
sys.excepthook = default_exception_hook
if rich_traceback:
rich_install(show_locals=True, theme=rich_traceback_theme)
else:
sys.excepthook = custom_exception_hook