-
-
Notifications
You must be signed in to change notification settings - Fork 167
syntax to document default values #284
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
I'm not sure I understand the question. AFAICT both of those formats should work fine with numpydoc. |
that's true, but neither of them is mentioned in the docstring guide. So I guess I should rephrase that and ask if that guide or the implementation are the official spec of the format. Anyway, that might have answered my question. I'll check with the maintainer and report back. |
okay, so the maintainer of |
Seems reasonable to me |
The
numpydoc
format guide says this about default values:so default values can be documented as
pandas
and laterxarray
decided to instead document default values as part of the type specification, but with a slightly different syntax:pandas
does something likewhile
xarray
uses a additional colon:(also, the example set for the
numpydoc_xref_ignore
contains'default'
)In order to fix the numerous broken references when building the
xarray
documentation usingnapoleon
I have been working on sphinx-doc/sphinx#7690 to preprocess the parameter type specification. However, including support forxarray
's default value syntax was rejected because thesphinx
maintainer didn't want to include a unofficial extension to the format (the PR is still pending).So here's my question: is any of those two formats "official"? If not, could we make one of them (or both?) official?
The text was updated successfully, but these errors were encountered: