[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
be502f9329
commit
ee348a9f4c
|
@ -68,6 +68,7 @@ try:
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
pass # No backport is installed
|
pass # No backport is installed
|
||||||
|
|
||||||
|
|
||||||
class Code:
|
class Code:
|
||||||
"""Wrapper around Python code objects."""
|
"""Wrapper around Python code objects."""
|
||||||
|
|
||||||
|
@ -935,17 +936,19 @@ class FormattedExcinfo:
|
||||||
while e is not None and id(e) not in seen:
|
while e is not None and id(e) not in seen:
|
||||||
seen.add(id(e))
|
seen.add(id(e))
|
||||||
if isinstance(e, ExceptionGroupTypes):
|
if isinstance(e, ExceptionGroupTypes):
|
||||||
reprtraceback: Union[ReprTracebackNative, ReprTraceback] = ReprTracebackNative(
|
reprtraceback: Union[
|
||||||
|
ReprTracebackNative, ReprTraceback
|
||||||
|
] = ReprTracebackNative(
|
||||||
traceback.format_exception(
|
traceback.format_exception(
|
||||||
type(excinfo.value), excinfo.value, excinfo.traceback[0]._rawentry
|
type(excinfo.value),
|
||||||
|
excinfo.value,
|
||||||
|
excinfo.traceback[0]._rawentry,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
reprcrash: Optional[ReprFileLocation] = None
|
reprcrash: Optional[ReprFileLocation] = None
|
||||||
elif excinfo_:
|
elif excinfo_:
|
||||||
reprtraceback = self.repr_traceback(excinfo_)
|
reprtraceback = self.repr_traceback(excinfo_)
|
||||||
reprcrash = (
|
reprcrash = excinfo_._getreprcrash() if self.style != "value" else None
|
||||||
excinfo_._getreprcrash() if self.style != "value" else None
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
# Fallback to native repr if the exception doesn't have a traceback:
|
# Fallback to native repr if the exception doesn't have a traceback:
|
||||||
# ExceptionInfo objects require a full traceback to work.
|
# ExceptionInfo objects require a full traceback to work.
|
||||||
|
|
Loading…
Reference in New Issue