From: Andres Noetzli Date: Mon, 27 Jun 2022 21:57:05 +0000 (-0700) Subject: [Docs] Update `EnumDocumenter` for newer Sphinx (#8914) X-Git-Tag: cvc5-1.0.1~31 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad425c0bc9931c09f615cd55585aa6f78206a847;p=cvc5.git [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()`. --- 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