From ef518294a3f93f8b389f87cf9fedd7ddb4174cb8 Mon Sep 17 00:00:00 2001 From: Stephan Breimann Date: Fri, 18 Sep 2026 19:44:41 +0200 Subject: [PATCH] docs(api): drop the "Bases: object" line from every class page Every public class derives from `object` or from an internal template ABC, so the line carries no information and pushes the class summary down. The cause was not what it looked like. conf.py contained `"show-inheritance": False` in autodoc_default_options, which reads as a switch that turns the feature OFF and in fact turns it ON: autodoc enables a flag option when the KEY IS PRESENT, whatever the value. Removing the `:show-inheritance:` line from the autosummary class template alone changed nothing - a rebuild still showed the line on all 43 class pages, which is how the real cause surfaced. Both are now gone, and conf.py carries a NOTE so the key is not "restored" to False later. Verified on a full build: 0 of 233 generated pages contain "Bases:", where 43 of 43 class pages did before. Docs configuration only; no library code and no docstring touched. Co-Authored-By: Claude Fable 5.1 --- docs/source/_templates/autosummary/class_template.rst | 1 - docs/source/conf.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/source/_templates/autosummary/class_template.rst b/docs/source/_templates/autosummary/class_template.rst index 20f821718..ddfba81e5 100644 --- a/docs/source/_templates/autosummary/class_template.rst +++ b/docs/source/_templates/autosummary/class_template.rst @@ -5,7 +5,6 @@ .. autoclass:: {{ objname }} :members: __init__ :exclude-members: {{ methods|join(', ') }} - :show-inheritance: {% block methods %} {% if methods %} diff --git a/docs/source/conf.py b/docs/source/conf.py index 4cd7e00ab..4a2694060 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -95,7 +95,11 @@ "private-members": False, "special-members": "", "inherited-members": False, # Document members that are inherited from the base class - "show-inheritance": False, # Show the base classes in the documentation for a class + # NOTE: "show-inheritance" is deliberately ABSENT. In autodoc_default_options a flag is + # enabled by the KEY'S PRESENCE, so `"show-inheritance": False` switched it ON and put a + # "Bases: object" line on every class page. Every public class here derives from `object` + # or an internal template ABC, so that line is pure noise. Do not re-add the key, and keep + # `:show-inheritance:` out of _templates/autosummary/class_template.rst as well. "ignore-module-all": False, # Ignore __all__ when looking for members to document "exclude-members": "", "autodoc_typehints": "description",