I am using napoleon to autodoc Google style docstrings. It looks it doesn't automatically creates a list to describe each element in a tuple that a function returns. That is, if I am returning multiple output arguments, how best to document this?
Another issue is creating a sublist for a Args parameter. If a parameter is dict or a class and I want to document keys or methods the parameter must have, how best to do that?
It would be nice if I could write
def foo(arg):
'''basic usage
Args:
arg (dict): must contain the keys:
'configfile': specifies config file
'threshold': minimum value to use in algorithm
Returns:
numPeaks (int): number of peaks above threshold
peakPos (list): list of peak positions
'''
I asked this on stack overflow and got further, the suggestion for the return arguments was to first document the fact that you return a tuple. However I still find I need to manually introduce restructured text for the sublist. i.e:
Returns:
(tuple): peak information output:
* numPeaks (int): blah
* peakPos (list): blah
But I'd rather not waste space documenting the fact that the return is a tuple (although maybe I should to be more precise).