Python Sphinx autodoc and decorated members

前端 未结 6 945
孤城傲影
孤城傲影 2020-12-10 00:51

I am attempting to use Sphinx to document my Python class. I do so using autodoc:

.. autoclass:: Bus
   :members:

While it correctly fetche

6条回答
  •  伪装坚强ぢ
    2020-12-10 01:20

    Added in version 1.1 you can now override the method signature by providing a custom value in the first line of your docstring.

    http://sphinx-doc.org/ext/autodoc.html#confval-autodoc_docstring_signature

    @checkStale
    def open(self):
        """
        open()
        Some docs.
        """
        # Code
    

提交回复
热议问题