Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Objects/typevarobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2134,6 +2134,7 @@ typealias_new_impl(PyTypeObject *type, PyObject *name, PyObject *value,
} else {
if (!PyUnicode_Check(qualname)) {
PyErr_SetString(PyExc_TypeError, "qualname must be a string");
Py_DECREF(module);
return NULL;
}
}
Copy link
Member

@efimov-mikhail efimov-mikhail Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, it's better to place obtaining of module after qualname related if-block and remove a call of Py_DECREF(module).

Expand Down
Loading