Skip to content

ValueError exception added to handle mix of {} and % string in colorbar format #27015

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
merged 1 commit into from
Oct 8, 2023

Conversation

borgesaugusto
Copy link
Contributor

PR summary

Addresses issue #27007 . If the try/except is done inversely, the error happens in the other block, but the edge case is formatted correctly. Then, both exceptions (TypeError and ValueError) will use the StrMethodFormatter.
The test is created separetly from test_colorbar_format() (L615) to make it clearer.

PR checklist

@QuLogic
Copy link
Member

QuLogic commented Oct 7, 2023

We do prefer rebases over merges, if you can do so.

@rcomer rcomer added this to the v3.8.1 milestone Oct 8, 2023
@rcomer rcomer merged commit 7f63a18 into matplotlib:main Oct 8, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 8, 2023
@rcomer
Copy link
Member

rcomer commented Oct 8, 2023

Thanks @borgesaugusto and congratulations on your first PR merged into Matplotlib! Your other one should be merged soon (just waiting for the tests to pass). I hope we hear from you again.

@borgesaugusto borgesaugusto deleted the iss_27007 branch October 8, 2023 10:29
rcomer added a commit that referenced this pull request Oct 8, 2023
…015-on-v3.8.x

Backport PR #27015 on branch v3.8.x (ValueError exception added to handle mix of {} and % string in colorbar format)
@ksunden ksunden mentioned this pull request Nov 2, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[Bug]: Colorbar format string kind guess could be made more robust
5 participants