File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 6868except ModuleNotFoundError :
6969 pass # No backport is installed
7070
71+
7172class Code :
7273 """Wrapper around Python code objects."""
7374
@@ -935,17 +936,19 @@ def repr_excinfo(
935936 while e is not None and id (e ) not in seen :
936937 seen .add (id (e ))
937938 if isinstance (e , ExceptionGroupTypes ):
938- reprtraceback : Union [ReprTracebackNative , ReprTraceback ] = ReprTracebackNative (
939+ reprtraceback : Union [
940+ ReprTracebackNative , ReprTraceback
941+ ] = ReprTracebackNative (
939942 traceback .format_exception (
940- type (excinfo .value ), excinfo .value , excinfo .traceback [0 ]._rawentry
943+ type (excinfo .value ),
944+ excinfo .value ,
945+ excinfo .traceback [0 ]._rawentry ,
941946 )
942947 )
943948 reprcrash : Optional [ReprFileLocation ] = None
944949 elif excinfo_ :
945950 reprtraceback = self .repr_traceback (excinfo_ )
946- reprcrash = (
947- excinfo_ ._getreprcrash () if self .style != "value" else None
948- )
951+ reprcrash = excinfo_ ._getreprcrash () if self .style != "value" else None
949952 else :
950953 # Fallback to native repr if the exception doesn't have a traceback:
951954 # ExceptionInfo objects require a full traceback to work.
You can’t perform that action at this time.
0 commit comments