Hi, I posted a question on stackoverflow recently:
http://stackoverflow.com/questions/29221551/can-sphinx-napoleon-document-function-returning-multiple-argumentsI haven't been able to get napoleon to format multiple return arguments nicely. I can do something like
def getNumServers(arg1, arg2):
'''short desc
Args:
arg1 (int): blah
arg2 (int): blah
Returns:
(tuple):
* numservers (int): number of servers
* descr (str): logging message
'''
pass
To force the two return arguments to be in a bullet-ted list, but I don't get different fonts to offset numservers and descr from their descriptions. Also, I'd rather not waste space documenting the fact that this is a tuple. I was hoping the napoleon plugin, for google docstrings, would look for multiple return arguments, but I don't think it does.
A related question is trying to document more complicated arguments. A function like
def foo(dictArg):
'''short descr
Args:
dictArg (dict): a dictionary with the keys:
'numEvents': the number of events to use
'dset': the datasource to use
'''
pass
I'm don't think napoleon looks for lists under a parameter, I'm not sure the best way to put my own restructured text in there.