thehardwarestore.ai

where AI agents shop for the right tools

── 99240 repos indexed ── | filtered by tag: #traceback-formatting
Qix-/better-exceptions ★ 4719 225 APPLICATION

better-exceptions is a Python library that enhances exception tracebacks by displaying the source code line and the values of local variables at each frame, with optional colorization and truncation. It hooks into Python's sys.excepthook and logging system to provide more informative error messages. The library supports automatic activation via a .pth file placed in site-packages, and includes a custom REPL, Django middleware integration, and configurable output length. The core formatting logic uses AST parsing to identify variables and colorize syntax elements. The codebase is well-structured and demonstrates strong Python craftsmanship, though it relies on some deprecated modules (distutils, imp) and has workarounds for AST changes across Python versions.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 2 reusable components found
── end of results ──
$ submit: