I have a Python class something like the following, with docstrings intended to be converted into documentation by Sphinx:
class Direction(object):
"""
A direction in which movement can be made.
"""
def __init__(self):
self._name = None
@property
def name(self):
"""
The unique name of the direction.
:return: The direction name
:rtype: string
"""
return self._name
@name.setter
def name(self, value):
"""
Sets the direction name.
:param string value: The direction name
"""
self._name = value
The Sphinx output looks something like this:
class Direction(name) A direction in which movement can be made.
name The unique name of the direction.
Returns: The direction name
Return type: string
which is fine as far as it goes, but note the complete absence of any information about the name
setter.
Is there any way to get Sphinx to generate documentation for the property setter?