Skip to content
Prev Previous commit
Next Next commit
return None not NULL
  • Loading branch information
JelleZijlstra committed May 21, 2024
commit b0809daba8ccbdaeba4249c2720845da167cd9d0
2 changes: 1 addition & 1 deletion Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ func_get_annotation_dict(PyFunctionObject *op)
{
if (op->func_annotations == NULL) {
if (op->func_annotate == NULL || !PyCallable_Check(op->func_annotate)) {
return NULL;
Py_RETURN_NONE;
}
PyObject *one = _PyLong_GetOne();
PyObject *ann_dict = _PyObject_CallOneArg(op->func_annotate, one);
Expand Down