Skip to content

Commit 5cc8afd

Browse files
committed
Fix ImportError and BaseExceptionGroup_repr()
1 parent 624f6e4 commit 5cc8afd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Objects/exceptions.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,8 @@ BaseExceptionGroup_str(PyBaseExceptionGroupObject *self)
897897
}
898898

899899
static PyObject *
900-
BaseExceptionGroup_repr(PyObject *op)
900+
BaseExceptionGroup_repr(PyBaseExceptionGroupObject *self)
901901
{
902-
PyBaseExceptionGroupObject *self = PyBaseExceptionGroupObject_CAST(op);
903902
assert(self->msg);
904903

905904
PyObject *exceptions_str = NULL;
@@ -1736,7 +1735,7 @@ static PyMethodDef ImportError_methods[] = {
17361735
ComplexExtendsException(PyExc_Exception, ImportError,
17371736
ImportError, 0 /* new */,
17381737
ImportError_methods, ImportError_members,
1739-
0 /* getset */, ImportError_str,
1738+
0 /* getset */, ImportError_str, 0,
17401739
"Import can't find module, or can't find name in "
17411740
"module.");
17421741

0 commit comments

Comments
 (0)