Better display of inherited members

Open
#79 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

No implementation file or test is named. Start by locating the automodule handling for :inherited-members: and :show-inheritance:, then inspect how inherited members are currently rendered. Done means inherited members are grouped by parent class as in the example while normal class documentation remains separate.

Written by the indexing model from the issue text.

Description

extensions:autodoc type:enhancement

I am using automodule with :members: and :undoc-members: (the latter to remind me to write documentation!)

There are two options for inheritance. If I use :inherited-members:
then the inherited members show up as though they belonged in the classes. If I use :show-inheritance: then you just get a list of parent classes.

What I'd prefer to see is something similar to what Javadoc generates:

#!text

Class Foo:
  Inherited from Bar: open, close, move
  Inherited from Qux: read, write

  Normal documentation shown here

Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sphinx-doc/sphinx

All issues in sphinx-doc/sphinx

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.