Open peterjc opened 7 years ago
Hi @peterjc, Thanks for reporting this issue. I'll try to considere this. Concerning Example, Pyment doesn't know that keyword so it considered it as a parameter.
Maybe pyment could consider all the sections sphinx also does?
https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
Docstring Sections All of the following section headers are supported:
Args (alias of Parameters) Arguments (alias of Parameters) Attention Attributes Caution Danger Error Example Examples Hint Important Keyword Args (alias of Keyword Arguments) Keyword Arguments Methods Note Notes Other Parameters Parameters Return (alias of Returns) Returns Raises References See Also Tip Todo Warning Warnings (alias of Warning) Warns Yield (alias of Yields) Yields
@dadadel how hard would be to implement this? Could you give some pointers where to change this in the code?
Example, call this
test_bullets.py
,Actual output:
Or:
Note the problem line
:param This: should be the same length as point_a
created from the second line of the bullet point for argumentpoint_b
.Note also the problem line
:param Example:
Note also that the periods (full stops) have been removed.
Note also the one-line summary
Return the Euclidean distance between points A and B.
was removed.Expected output:
There is some flexibility but the continuation line must be indented, this is a valid reStructuredText docstring: