From 45e5452482f480c0ee6cb324e790fd1c71d4eca7 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 21 Sep 2021 15:32:39 +0100 Subject: [PATCH] doc: Avoid duplicate entry warning Both the 'FiniteMachine' and 'HierarchicalFiniteMachine' in 'automaton.machines' define an 'Effect' attribute. It seems recent versions of autodoc can't handle this since we're seeing the following warning: automaton/machines.py:docstring of automaton.machines.Effect:1:duplicate object description of automaton.machines.Effect, other instance in reference/index, use :noindex: for one of them Do as it says and configure 'noindex' for the latter. This means we lose the ability to link to other members of this class but that's a necessary compromise since there's no way to exclude an individual member. Change-Id: Ic9e50f6b56a278032463357552960e40c2ddf6a7 Signed-off-by: Stephen Finucane --- doc/source/reference/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst index cf60b2b..481360c 100644 --- a/doc/source/reference/index.rst +++ b/doc/source/reference/index.rst @@ -14,6 +14,7 @@ Machines :special-members: __iter__, __contains__ .. autoclass:: automaton.machines.HierarchicalFiniteMachine + :noindex: :members: -------