-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: put newline in matplotlibrc when setting default backend #21662
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
Conversation
.github/workflows/tests.yml
Outdated
@@ -225,6 +225,13 @@ jobs: | |||
fi | |||
fi | |||
|
|||
cat <<EOT >> mplsetup.cfg | |||
[rc_options] | |||
##backend=Agg |
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.
Does this do anything with the double comment?
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.
The goal was to not change the resultant matplotlibrc
file from what it would be without this configuration. Without the bug fix this would have put the webagg.port on the same line so it would be missing and any import would fail..
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.
But the substitution doesn't care that this is double commented, it only inserts the value from here with a fixed key. And since this file is parsed by ConfigParser
, it's not going to see this line at all, anyway.
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.
🤦🏻 🐑 I understand now.
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.
Third times the charm?
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.
Can confirm that this fixes #21660, thanks @tacaswell!
9da439d
to
e1a3266
Compare
e1a3266
to
e33baa8
Compare
…etting default backend
…662-on-v3.5.x Backport PR #21662 on branch v3.5.x (FIX: put newline in matplotlibrc when setting default backend)
Closes #21660
PR Summary
We are missing a new line when formatting the matplotlibrc
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).