From ad425c0bc9931c09f615cd55585aa6f78206a847 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Mon, 27 Jun 2022 14:57:05 -0700 Subject: [PATCH] [Docs] Update `EnumDocumenter` for newer Sphinx (#8914) The `no_docstring` argument of `sphinx.ext.autodoc.Documenter.add_content()` has been [deprecated](https://www.sphinx-doc.org/en/master/changes.html) since Sphinx 3.4.0 (released in December 2020). It seems that newer Sphinx versions have removed that argument, which breaks our `EnumDocumenter` (e.g., see the following [example](https://github.com/cvc5/cvc5/runs/7081097179?check_suite_focus=true)). This commit updates our use of `sphinx.ext.autodoc.Documenter.add_content()`. --- docs/ext/autoenum.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/ext/autoenum.py b/docs/ext/autoenum.py index 9066a6109..f5a1109d4 100644 --- a/docs/ext/autoenum.py +++ b/docs/ext/autoenum.py @@ -26,13 +26,12 @@ class EnumDocumenter(ClassDocumenter): return isinstance(member, enum.Enum) def add_content(self, - more_content: Optional[StringList], - no_docstring: bool = False) -> None: + more_content: Optional[StringList]) -> None: """Add the docstring for this object.""" # overriding this flag prints __doc__ just as we want to. self.doc_as_attr = False - super().add_content(more_content, no_docstring) + super().add_content(more_content) self.doc_as_attr = True -- 2.30.2