-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-144629: Add test for the PyFunction_GetAnnotations function #144630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| PyObject *annotations = PyFunction_GetAnnotations(func); | ||
| if(annotations != NULL){ | ||
| return Py_NewRef(annotations); | ||
| } else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } else { | |
| } | |
| else { |
08edaaf to
5e4d05f
Compare
|
The other test functions in the |
| PyObject *annotations = PyFunction_GetAnnotations(func); | ||
| if (annotations != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this whole function can be rewritten as return Py_XNewRef(PyFunction_GetAnnotations(func)).
Add test for the
PyFunction_GetAnnotationsfunction.