sphinx-doc / sphinx-doc/sphinx
Automatic :noindex: for sub-objects
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
In my documentation, I list an abridged version of several previously-defined classes. In order to prevent duplicate indexing, I assumed that I would only need one :noindex: for each:
.. class:: State
:noindex:
.. attribute:: turn_num
.. attribute:: our_team
.. method:: obj_by_coords(coords)
.. class:: Obj
:noindex:
.. attribute:: id
.. attribute:: coords
.. attribute:: obj_type
...but this produces warnings:
WARNING: duplicate object description of State.our_team, other instance in api, use :noindex: for one of them
WARNING: duplicate object description of State.obj_by_coords, other instance in api, use :noindex: for one of them
etc
The solution is very verbose:
.. class:: State
:noindex:
.. attribute:: turn_num
:noindex:
.. attribute:: our_team
:noindex:
.. method:: obj_by_coords(coords)
:noindex:
.. class:: Obj
:noindex:
.. attribute:: id
:noindex:
.. attribute:: coords
:noindex:
.. attribute:: obj_type
:noindex:
It seems to me like it would always make sense to automatically apply :noindex: to all the children of a parent with :noindex:. Am I missing something?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named in the issue. Start by locating how :noindex: is handled for class, attribute, and method directives, then check existing duplicate-object indexing tests. Done means a parent marked :noindex: suppresses indexing warnings for its documented children without requiring repeated options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100