-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MNT: make sure we do not mutate input in Text.update #18839
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
MNT: make sure we do not mutate input in Text.update #18839
Conversation
We take in a dictionary (called kwargs rather than collecting kwargs) which we mutate in the method. We pop bbox and fontproperties keys out of the user supplied dictionary (to make sure the precedence and default behaviors are correct) which is propagated back out to user code. This makes an internal copy of the dictionary before we mutate it. closes matplotlib#18838
6df1210
to
3f65a59
Compare
fixed and pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anybody can merge after CI pass.
@tacaswell That works. Thanks. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
…3.3.x Backport PR #18839 on branch v3.3.x
PR Summary
We take in a dictionary (called kwargs rather than collecting kwargs)
which we mutate in the method. We pop bbox and fontproperties keys
out of the user supplied dictionary (to make sure the precedence and
default behaviors are correct) which is propagated back out to user
code.
This makes an internal copy of the dictionary before we mutate it.
closes #18838
@shevawen Can you please confirm that this fixes your problem?
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).