doc: Replace incorrect directive
autotype was not a valid directive until Sphinx 9.0 [1] and now that it is, it is causing errors. Replace the directive with the correct directive. [1] https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-autotype Change-Id: Ic3a19e7d2ea1bf3917bd3df8ead33ec1f83bd83c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
@@ -128,7 +128,7 @@ Autodoc directives
|
||||
Theses directives scan your code to generate the documentation from the
|
||||
docstrings and your API types and controllers.
|
||||
|
||||
.. rst:directive:: .. autotype:: myapp.MyType
|
||||
.. rst:directive:: .. autoclass:: myapp.MyType
|
||||
|
||||
Generate the myapp.MyType documentation.
|
||||
|
||||
@@ -165,7 +165,7 @@ Documentation source
|
||||
|
||||
An integer
|
||||
|
||||
.. autotype:: wsmeext.sphinxext.SampleType
|
||||
.. autoclass:: wsmeext.sphinxext.SampleType
|
||||
:members:
|
||||
|
||||
.. autoservice:: wsmeext.sphinxext.SampleService
|
||||
@@ -180,11 +180,8 @@ Result
|
||||
|
||||
An integer
|
||||
|
||||
.. autotype:: wsmeext.sphinxext.SampleType
|
||||
.. autoclass:: wsmeext.sphinxext.SampleType
|
||||
:members:
|
||||
|
||||
.. autoservice:: wsmeext.sphinxext.SampleService
|
||||
:members:
|
||||
|
||||
|
||||
.. _Sphinx: http://sphinx.pocoo.org/
|
||||
|
||||
@@ -242,6 +242,5 @@ Predefined Types
|
||||
|
||||
.. default-domain:: wsme
|
||||
|
||||
- .. autotype:: wsme.types.File
|
||||
:members:
|
||||
|
||||
- .. autoclass:: wsme.types.File
|
||||
:members:
|
||||
|
||||
@@ -14,11 +14,10 @@ Example
|
||||
:type: int
|
||||
|
||||
.. wsme:service:: name/space/SampleService
|
||||
|
||||
.. wsme:function:: getType
|
||||
|
||||
Returns a :wsme:type:`MyType <MyType>`
|
||||
|
||||
.. wsme:function:: getType
|
||||
|
||||
Returns a :wsme:type:`MyType <MyType>`
|
||||
|
||||
.. default-domain:: wsme
|
||||
|
||||
@@ -26,18 +25,18 @@ Example
|
||||
|
||||
An integer
|
||||
|
||||
.. autotype:: wsmeext.sphinxext.SampleType
|
||||
.. autoclass:: wsmeext.sphinxext.SampleType
|
||||
:members:
|
||||
|
||||
.. autoservice:: wsmeext.sphinxext.SampleService
|
||||
:members:
|
||||
|
||||
|
||||
.. autotype:: test_sphinxext.ASampleType
|
||||
.. autoclass:: test_sphinxext.ASampleType
|
||||
:members:
|
||||
|
||||
.. autotype:: wsme.types.bytes
|
||||
.. autoclass:: wsme.types.bytes
|
||||
|
||||
.. autotype:: wsme.types.text
|
||||
.. autoclass:: wsme.types.text
|
||||
|
||||
.. _Sphinx: http://sphinx.pocoo.org/
|
||||
|
||||
@@ -513,10 +513,10 @@ class FunctionDocumenter(autodoc.MethodDocumenter):
|
||||
]
|
||||
return inspect.formatargspec(args, defaults=defaults)
|
||||
|
||||
def get_doc(self, encoding=None):
|
||||
def get_doc(self):
|
||||
"""Inject the type and param fields into the docstrings so that the
|
||||
user can add its own param fields to document the parameters"""
|
||||
docstrings = super(FunctionDocumenter, self).get_doc(encoding)
|
||||
docstrings = super().get_doc()
|
||||
|
||||
protocols = get_protocols(
|
||||
self.options.protocols or self.env.app.config.wsme_protocols
|
||||
|
||||
Reference in New Issue
Block a user