mirror of
https://github.com/python/cpython.git
synced 2025-11-09 10:01:42 +00:00
gh-125593: Use colors to highlight error locations in tracebacks from exception group (#125681)
This commit is contained in:
parent
f6cc7c8bd0
commit
51b012b2a8
3 changed files with 45 additions and 1 deletions
|
|
@ -1428,7 +1428,7 @@ def format(self, *, chain=True, _ctx=None, **kwargs):
|
|||
f'+---------------- {title} ----------------\n')
|
||||
_ctx.exception_group_depth += 1
|
||||
if not truncated:
|
||||
yield from exc.exceptions[i].format(chain=chain, _ctx=_ctx)
|
||||
yield from exc.exceptions[i].format(chain=chain, _ctx=_ctx, colorize=colorize)
|
||||
else:
|
||||
remaining = num_excs - self.max_group_width
|
||||
plural = 's' if remaining > 1 else ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue