Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
MNT: Cleanup docstring substitution mechanisms#28795
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
149e3a0
toaf24473
Compare62dcafa
to66c2048
Compare66c2048
to3a6901d
Comparetimhoffm commentedSep 9, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Possible future improvement: One could still rename |
3a6901d
to3a319ee
Compare3a319ee
to4e2b127
CompareUh oh!
There was an error while loading.Please reload this page.
They do not have relevant functional overlap. Thus, it's simplerto keep them completely separated.
While it's internally a dict.update. The logical process is aregistration to make the names publically available. Also,remove the possibility to pass a dict. Passing kwargs isenough and we can simplify the API to only one type of usage.
4e2b127
tofe9479a
Compare24c5048
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
* MNT: Make Substitution and _ArtistPropertiesSubstitution independentThey do not have relevant functional overlap. Thus, it's simplerto keep them completely separated.* Rename _ArtistPropertiesSubstitution.update() to register()While it's internally a dict.update. The logical process is aregistration to make the names publically available. Also,remove the possibility to pass a dict. Passing kwargs isenough and we can simplify the API to only one type of usage.
Uh oh!
There was an error while loading.Please reload this page.
Inspired by#28746.
Since the module
_docstring
is internal, we can do this refactoring without deprecations.It's probably easiest for review to go through the commits one after the other. Each is a simple change, but they often touch the same code so that separate PRs would depend on each other.I've stripped this down for easier review. This is now two commits, which I suggest should be kept (i.e. please do not squash)
Substitution
and_ArtistPropertiesSubstitution independent
They do not have relevant functional overlap. Thus, it's simpler to keep them completely separated.
_ArtistPropertiesSubstitution.update()
toregister()
While it's internally a dict.update. The logical process is a registration to make the names publically available. Also,
remove the possibility to pass a dict. Passing kwargs is enough and we can simplify the API to only one type of usage.