-
-
Notifications
You must be signed in to change notification settings - Fork 7.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ksunden
merged 2 commits into
matplotlib:main
from
timhoffm:cleanup-docstring-substitution
Sep 30, 2024
Merged
MNT: Cleanup docstring substitution mechanisms #28795
ksunden
merged 2 commits into
matplotlib:main
from
timhoffm:cleanup-docstring-substitution
Sep 30, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
149e3a0
to
af24473
Compare
62dcafa
to
66c2048
Compare
66c2048
to
3a6901d
Compare
Possible future improvement: One could still rename |
3a6901d
to
3a319ee
Compare
5 tasks
3a319ee
to
4e2b127
Compare
QuLogic
approved these changes
Sep 21, 2024
They do not have relevant functional overlap. Thus, it's simpler to keep them completely separated.
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.
4e2b127
to
fe9479a
Compare
kyracho
pushed a commit
to kyracho/matplotlib
that referenced
this pull request
Oct 10, 2024
* MNT: Make Substitution and _ArtistPropertiesSubstitution independent They do not have relevant functional overlap. Thus, it's simpler to keep them completely separated. * Rename _ArtistPropertiesSubstitution.update() to register() 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.