WARNING: py:class reference target not found: integer -- return number of occurrences of value
This can be reproduced with e.g. a python module sub_deque.py:
class SubDeque(deque):
pass
.. automodule:: sub_deque
:inherited-members:
I'd be happy to provide a patch for this myself if you feel this issue should be fixed.
Bug report
When
collections.dequeis subclassed and the resulting class is documented with Sphinx using the option:inherited-members:, the following error appears:I assume this is because the
PyDoc_STRVARdocstring of the C-implementation is not compliant to PEP-7 as required inPyDoc_STRVAR:cpython/Modules/_collectionsmodule.c
Lines 992 to 993 in d9dff4c
And everything after
->is interpreted as type hint.This can be reproduced with e.g. a python module
sub_deque.py:and a documenation file
docs/src/sub_deque.rst:which is then built with Sphinx:
sphinx-build -W docs/src docs/dist.I'd be happy to provide a patch for this myself if you feel this issue should be fixed.
Your environment
Linked PRs
collections.deque#100990