Sphinx ignores docstrings in the property settings, so all documentation for the property should be in the @property method.
While Sphinx understands certain specific tags (for example :param ...: , it accepts any custom tags and displays them as labels for the text that follows them.
Therefore, something like the following will make the documentation in a reasonable way ( getter , setter and type can be changed to any other text if necessary).
@property def name(self): """ The unique name of the direction. :getter: Returns this direction name :setter: Sets this direction name :type: string """ return self._name
The generated documentation looks something like this:
class Direction (name) Direction in which movement can be performed.
Name The unique name of the destination.
Getter: Returns the name of this direction.
Setter: Sets the name of this direction.
Type: string
Thanks to @BrenBarm and @ABB for pointing me in the direction of this solution.
Matthew murdoch
source share