-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: document how to created interpolated stubs #28746
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
base: main
Are you sure you want to change the base?
Conversation
Admittedly, I also don't have a full overview on our substitution mechanims (but possibly that's part of the problem here). I have the feeling that the description here only targets part of our machinery and it is still not clear what exactly we have and for which We have
Notes:
I believe we first have to clean up and sort out what we actually want to do with these helpers before we can cleanly document their usage. |
It is a defined term for it https://en.wikipedia.org/wiki/String_interpolation (though generally only applying immediately to literals, I think, it could be argued as similar enough.) |
If we want to cling to "interpolation", we should use the full technical "string interpolation" (or "docstring interpolation" if you want). "interpolation" by itself is much more associated with mathematics, which would be confusing. |
I was gonna just change it up to something like "Create reusable docstrings" - focus on purpose rather than mechanism 🤷♀️ |
I like "Reuse docstrings". It has more focus on the act of reusing compared to the creation. This section could contain the existing "Inherit docstrings" as a subsection. It should eventually mention all
But as you say, structure by purpose rather than mechanics. I believe the "Assumed use cases" from #28746 (comment) could be a guideline for purposes. I think we currently do:
That said, I'm not quite clear whether we need both |
PR summary
Inspired by the colorizer and InsetArtist PRs that are both adding new objects that get used in a few places/forwarded to, I added a section to the doc docs documenting how to add
_docstring.interpd
docs.Also deleted note on how we're still debating whether we want to use this functionality because that note was added in 2017 on how this functionality is up for debate b/c either:
I didn't document how to use the kwdoc functionality b/c I don't understand it enough to:
matplotlib/lib/matplotlib/_docstring.py
Lines 92 to 102 in 436a12a
PR checklist