Fix code to work with Sphinx>5.0
The patch [1] introduced the use of Sphinx 6.2.1, which has some
incompatibilities with the current code base.
As we can see in [2], the `no_docstring` argument of
`sphinx.ext.autodoc.Documenter.add_content()` was removed. It was
already not used in our code base, therefore, we can remove its
usage without any issues.
[1] 289feed317
[2] https://www.sphinx-doc.org/en/master/extdev/deprecated.html#dev-deprecated-apis
Change-Id: I65c2bd535fe366933e9aaf842ee9b953c5af375b
This commit is contained in:
parent
80bda9053f
commit
a45e0af97e
@ -223,13 +223,12 @@ class TypeDocumenter(autodoc.ClassDocumenter):
|
||||
else:
|
||||
return False
|
||||
|
||||
def add_content(self, more_content, no_docstring=False):
|
||||
def add_content(self, more_content):
|
||||
# Check where to include the samples
|
||||
samples_slot = self.options.samples_slot or self.default_samples_slot
|
||||
|
||||
def add_docstring():
|
||||
super(TypeDocumenter, self).add_content(
|
||||
more_content, no_docstring)
|
||||
super(TypeDocumenter, self).add_content(more_content)
|
||||
|
||||
def add_samples():
|
||||
protocols = get_protocols(
|
||||
@ -284,14 +283,13 @@ class AttributeDocumenter(autodoc.AttributeDocumenter):
|
||||
self.datatype = self.object.datatype
|
||||
return success
|
||||
|
||||
def add_content(self, more_content, no_docstring=False):
|
||||
def add_content(self, more_content):
|
||||
self.add_line(
|
||||
u':type: %s' % datatypename(self.datatype),
|
||||
'<wsmeext.sphinxext>'
|
||||
)
|
||||
self.add_line(u'', '<wsmeext.sphinxext>')
|
||||
super(AttributeDocumenter, self).add_content(
|
||||
more_content, no_docstring)
|
||||
super(AttributeDocumenter, self).add_content(more_content)
|
||||
|
||||
def add_directive_header(self, sig):
|
||||
super(AttributeDocumenter, self).add_directive_header(sig)
|
||||
@ -528,8 +526,8 @@ class FunctionDocumenter(autodoc.MethodDocumenter):
|
||||
self.wsme_fd, docstrings, protocols
|
||||
)
|
||||
|
||||
def add_content(self, more_content, no_docstring=False):
|
||||
super(FunctionDocumenter, self).add_content(more_content, no_docstring)
|
||||
def add_content(self, more_content):
|
||||
super(FunctionDocumenter, self).add_content(more_content)
|
||||
|
||||
def format_name(self):
|
||||
return self.wsme_fd.name
|
||||
|
Loading…
Reference in New Issue
Block a user