From e6490b5dbde1a6d09f382f41bfe54177fdb7b5ee Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Mon, 11 Jan 2021 13:59:16 +0100 Subject: [PATCH] Use `cls` instead of class name in `Traceback.from_exception()` --- rich/traceback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rich/traceback.py b/rich/traceback.py index 985848b0..433aa7e9 100644 --- a/rich/traceback.py +++ b/rich/traceback.py @@ -222,7 +222,7 @@ class Traceback: rich_traceback = cls.extract( exc_type, exc_value, traceback, show_locals=show_locals ) - return Traceback( + return cls( rich_traceback, width=width, extra_lines=extra_lines,