-
-
Notifications
You must be signed in to change notification settings - Fork 167
Allow multiple Warning(s)
sections
#594
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
Comments
It seems like |
|
IMO the |
It does feel like Warnings should have been the spelling for Warns. But, given that we didn't do that, I agree with @rossbar's assessment. |
To me this seems a bit off from the stated purpose of the section, which to me is to enumerate and describe the
So the idea is that the section should be similar to the
With this in mind, there is some overlap potentially with when people would want to use the More specific to the OP's use case, I think they should use If this makes sense, we should probably add some text to clarify the intended use of the |
Ooof wait I was reading the description of the |
Yes, this is about
I think I tried this initially, and IIRC it worked under the Notes header, but not under other headers. The problem with that is that one might want the warnings to show higher up the page than Notes, e.g. right below Parameters (or at least, above Notes and See Also, as per the current spec). I might be misremembering, though—feel free to play around with the source of https://data-apis.org/array-api-extra/generated/array_api_extra.at.html#array_api_extra.at and |
This is another reason to prefer the
Then you should get three separate warning admonitions rendered in correct locations (the extended summary, the parameter description, and the notes section, respectively) If you instead rely on a Without having looked at it too closely, I suspect it would be possible to break this pattern to allow multiple |
it may be important to mention that I am using extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_copybutton",
] |
The I'm not sure what's happening in your case - my guesses would be a) a subtle indentation bug (though I don't see any problems) followed by b) different behavior in the napoleon parser, whether intentional or not. |
Using the specified
Warnings
section I can get something that looks like this:It would be nice to be able to split this into two separate admonitions. It feels natural to me to have two separate headers, both titled
Warning
.The text was updated successfully, but these errors were encountered: