pydata-sphinx-theme
pydata-sphinx-theme copied to clipboard
Field list format for different docstring styles
Hello!
I have a question about the output of a docstring when using different documentation "styles". The image below illustrates the output of a class when using "ReStructured Text style" and "Numpy Style".

Shouldn't the style and structure of the output be the same for both cases?
If not, is it possible to make the output of a docstring written with "ReStructuredText style" look the same as "Numpy style"? Using for example some other field or CSS?
Docstring used on the image:
"ReStructured Text style"
class CaseDescription:
"""
Attributes
----------
name : str
Test 0
physics : PhysicsDescription
Test1
time_options: TimeOptionsDescription
Test2
"""
"Numpy Style"
class CaseDescription:
"""
:ivar str name:
Test 0
:ivar PhysicsDescription physics:
Test1
:ivar TimeOptionsDescription time_options:
Test2
"""
there are many ways to generate documentation from the docstrings. there is the pure rst that you used in your first example and the Napoleon and Numpy styles. The latter create very different HTML outputs and are widely used in the Python community. I think it could be considered as a feature to have different ways of displaying docstring so that developers can select the one that fits best with their documentation.
Could you explain why they should behave the same?
This issue has been closed because it has been inactive for more than a year. You may reopen this issue if it has been closed in error.