-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
numpydoc sections not represented as its own block, if first in docstring #214
Comments
Definitely looks like a bug in the parser! Also, yeah, I was planning to add support for generic admonitions, just like in the Google parser. |
I can work on a quick PR tomorrow for the numpydoc parser! Is DocstringSectionAdmonition the catch-all for unknown sections? I think because I focused initially on numpydoc format in quartodoc, I totally missed that this piece existed in the google style parser 😅 (guessing from this google parser line) |
Yes! A PR would be awesome, thanks a lot :) |
Previously, sections titled "See also" and others were not recognized as sections, and therefore just parsed as regular text. Now, such unknown sections will be parsed as admonitions. In a previous breaking change, support for prose between sections was removed: this change compensantes the breakage by allowing users to use admonitions such as Note, Important, etc., to re-add prose between sections thanks to admonitions. This also further reduces the gap between Numpydoc and Google-style. Issue #214: #214 PR #219: #219 Co-authored-by: Timothée Mazzucotelli <[email protected]>
Describe the bug
For a function with a docstring like this:
griffe's numpydoc parses produces a single DocstringSectionText, with all the contents.
WDYT of editing this line of the numpydoc parse, to ensure any section marked with lines (
----
) is its own DocstringSectionText?https://github.com/mkdocstrings/griffe/blob/main/src/griffe/docstrings/numpy.py#L816
This way, various sections like See Also will be in their own DocstringSectionText, regardless of whether they're...
The text was updated successfully, but these errors were encountered: