wrong rendering of multi-line "Return" section #4
Comments
Not sure whether anything should change in Napoleon, but for whatever it's worth, you can also get the result you want by using this indentation which I don't think is incorrect in any way:
|
thanks @ExplodingCabbage, I will try that! However, as per the examples in the documentation the first syntax I showed should be correct, whereas it doesn't work properly. |
It looks to me like from this portion of the Google python styleguide: https://google.github.io/styleguide/pyguide.html#doc-function-returns that all of the I'm not sure if the ideal behavior would be to have the additional level of indentation in return values be accepted or if there should be a note in the docs/a warning thrown when doing this style of indentation. Either way, I also find the current behavior less than ideal. |
Also fix multi-line Returns: doc statements. (See sphinx-contrib/napoleon#4)
Any news on a solution to this issue or a workaround? I'm in the same position. The style guide and examples do not state clearly what should happen, but given the way it is for arguments, I believe @carlodri is right. |
My source docstring inside a class method (correct indent of multiple lines):
renders badly in this way:
whereas if I change it to this (wrong indentation of multiple lines):
it renders correctly to:
I'm using the
sphinx_rtd_theme
but a similar issue occurs with the defaultalabaster
theme.The text was updated successfully, but these errors were encountered: