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
A ".. private:: True/False" directive to override whether autodoc/autosummary treat a member as private (regardless of underscores) #6830
Comments
+0: Good idea. But we need to find more appropriate marker for this usage. I feel |
Is it the word "private" you're not keen on, or the use of ".. XXX"? I could try to come up with some more suggestions, but helpful to know what it is about ".. private::" that you're not keen on |
Sorry for less words. I thought about this in this a few days. And I got an answer why I felt not good.
Just an idea, I feel a little better to use info-field-list like |
OK fine.. I was also wondering about which way to jump on that question, so I'd be very happy with :private: |
…g contains :private:
…g contains :private:
…g has "private" metadata
…g has "private" metadata
…g has "private" metadata
Close #6830: autodoc: consider a member private if docstring contains :private:
Is your feature request related to a problem? Please describe.
Two problems:
Describe the solution you'd like
A directive a bit like "deprecated" that can be used in a docstring to override whether that member is considered private or not, by autodoc and autosummary.
e.g.
Important detail: needs to work with data/attribute docstrings (i.e. implementation shouldn't rely on doc).
Describe alternatives you've considered
Could be done via setting undoc-members on parent class/module, but that's really combersome since no locality-of-reference, plus I might want to do a separate sphinx run with private members visible for internal purposes.
As a workaround I've been able to mostly get it working for autodoc using autodoc-skip-member (though that doesn't work for autosummary, yet) like this; but it'd be better as a core capability, especially as I have no way to get the docstring Sphinx has extracted for any data/attributes.
The text was updated successfully, but these errors were encountered: