7

This question is related to this other one. The proposed and accepted solution is:

Returns:
       (tuple): tuple containing:                        
                    arg1: First Argument
                    arg2: Second Argument

This solution is not working, at least for me. The indented sub-block with arg1 and arg2 description is not parsed.

How should I manage multiple returns with sphinx, sphinx.ext.napoleon and Google Style docstring?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
rdbisme
  • 850
  • 1
  • 13
  • 39
  • I think that it's a duplicate of this [post](http://stackoverflow.com/questions/29221551/can-sphinx-napoleon-document-function-returning-multiple-arguments). – Jaime Arias Dec 06 '16 at 13:52
  • For posterity, the second, unaccepted answer on the other thread works fine. – lhuber Apr 10 '18 at 13:28

2 Answers2

0

This is a known issue that won't be fixed by the sphinx project (current maintainers of napoleon). As mentioned at the link, they don't consider multi-line returns a part of google spec and won't fix this.

jaimedash
  • 2,683
  • 17
  • 30
0

Try to use use the newline character \n in your docstring:

Returns:
    tuple: tuple containing:

        servers (list): servers to use \n
        msg (str): logging message string 
huilight
  • 1
  • 1