tango-controls / pytango

This project was moved to gitlab.com
http://pytango.rtfd.io
54 stars 44 forks source link

Fix sphinx v3 warning #352

Closed reszelaz closed 4 years ago

reszelaz commented 4 years ago

When building docs for a Device class written with low level API (which must define read_attr_hardware()) the following warning is raised: "docstring of sardana.tango.macroserver.MacroServer.MacroServer.read_attr_hardware:9: WARNING: Definition list ends without a blank line; unexpected unindent.". Introduce a missing blank line.

Note that I was not able to reproduce the warning when building the PyTango docs. It only happens when building my device docs (in Sardana) even if we simply define an empy method without docstring:

    def read_attr_hardware(self, data):
        pass

Maybe it has to do with the way the docsting is injected with the __doc_extra_DeviceImpl.document_method().

reszelaz commented 4 years ago

Note that the undocmented method is included explicitly in the autodoc with the :undoc-members::

.. autoclass:: MacroServer
    :show-inheritance:
    :members:
    :undoc-members: