From 069f6ef34831d7623126b774af69fc760c115668 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 22 Nov 2025 15:39:22 +1300 Subject: [PATCH] Docs: Fix cell option_spec inheritance Doesn't actually resolve the `:noindex:` failure, which is how I discovered the option wasn't being inherited, but it is a step in the right direction. --- docs/util/cell_documenter.py | 5 +++-- docs/util/custom_directives.py | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/util/cell_documenter.py b/docs/util/cell_documenter.py index 58e65c2ea..f30e88bcf 100644 --- a/docs/util/cell_documenter.py +++ b/docs/util/cell_documenter.py @@ -41,12 +41,13 @@ class YosysCellGroupDocumenter(Documenter): object: tuple[str, list[str]] lib_key = 'groups' - option_spec = { + option_spec = Documenter.option_spec.copy() + option_spec.update({ 'caption': autodoc.annotation_option, 'members': autodoc.members_option, 'source': autodoc.bool_option, 'linenos': autodoc.bool_option, - } + }) __cell_lib: dict[str, list[str] | dict[str]] | None = None @property diff --git a/docs/util/custom_directives.py b/docs/util/custom_directives.py index dc6dd29a4..4a23b44e4 100644 --- a/docs/util/custom_directives.py +++ b/docs/util/custom_directives.py @@ -245,12 +245,13 @@ class CellNode(TocNode): """A custom node that describes an internal cell.""" name = 'cell' - - option_spec = { + + option_spec = TocNode.option_spec.copy() + option_spec.update({ 'title': directives.unchanged, 'ports': directives.unchanged, 'properties': directives.unchanged, - } + }) doc_field_types = [ CellGroupedField('props', label='Properties', rolename='prop',