-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Warn if MPLBACKEND is invalid. #6699
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
Warn if MPLBACKEND is invalid. #6699
Conversation
Hi Anthony,
Else it looks good. I'd also be fine raising an error. |
Actually the error message already contains the list of valid backends (you can see it by calling explicitly |
I finally understand what is going on. I think a warning is fine for now: that's the current behaviour when the matplotlibrc ba kend is set to an unknown backend so it is at least consistent with the behaviour when using matplotlibrc. In general, I think it might be worth be more strict and throw errors when options are set to wrong values, but this behaviour needs to be consistent. |
I lean toward error as well. |
"In the face of ambiguity, resist the temptation to guess." I'd say the zen argues for an error here. |
Consensus seems to be to raise if invalid. |
cfb2d3d
to
6125d81
Compare
That makes the patch even more trivial. |
Do you mind changing l. 1455 and l. 1105 (that will require more work) as well to have the error raised consistently. |
Changing l.1455 is probably a no-go (because other applications may be using matplotlib and using Changing l.1105 comes down to switching the default value of |
I agree on 1455 having to stay as it is for being able to pass things through. I ma not sure about L1105, that makes all rcparsing raise. That should probably get wider discussion. |
I could be convinced to make this an error actually.