◐ Shell
clean mode source ↗

Fix Sphinx warnings in C API doc by vstinner · Pull Request #107274 · python/cpython

@vstinner

@vstinner vstinner commented

Jul 25, 2023

edited by github-actions Bot

Loading

@vstinner

Hum. I already created PR #107164 but this one is supposed to be more complete. But then I fixed more and more warnings in a local branch, and quickly I went to too many directions. Now I'm confused and I'm not sure how to split this work.

So instead I created PR #107278 to first fix warnings like c:identifier reference target not found: va_list.

serhiy-storchaka

.. c:function:: int PyBool_Check(PyObject *o)

Return true if *o* is of type :c:data:`PyBool_Type`. This function always
Return true if *o* is of type :c:data:`!PyBool_Type`. This function always

Choose a reason for hiding this comment

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

Would not be better to add the documentation for PyBool_Type?

Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``.

This version is also available via the symbol :data:`Py_Version`.
This version is also available via the symbol :c:var:`Py_Version`.

Choose a reason for hiding this comment

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

See #107091. It is discussed whether we should use :c:var: or :c:data:.

#107063 also fixes this line.

@vstinner

I reworked this change into a serie of changes: I created issue #107298. I abandon this PR.