for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"""Shared utility functions."""
import sys
from traceback import format_exception
def format_exc_skip(skip, limit=None):
"""Like traceback.format_exc but allow skipping the first frames."""
type, val, tb = sys.exc_info()
type
It is generally discouraged to redefine built-ins as this makes code very hard to read.
for i in range(skip):
i
tb = tb.tb_next
return ('\n'.join(format_exception(type, val, tb, limit))).rstrip()
It is generally discouraged to redefine built-ins as this makes code very hard to read.