Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve error handling in _parse_scatter_color_args#17245

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedApr 25, 2020
edited
Loading

PR Summary

Fixes#17243

The problem was thatmcolors.to_rgba_array(c) can raise two categories of ValueErrors. One are generic array conversion-related errors, the other is our ownValueError('RGBA values should be within 0-1 range'). Only the former should be catched and rewritten. Our ownValueError should directly surface.

I chose the simple approach of just checking the error message. One could alternatively introduce an own Exception subtype. But we're not really doing that in other places andValueError seems exactly right for out-of-bounds numbers.

@timhoffmtimhoffmforce-pushed thescatter-color-error-message branch from33ee858 toa397322CompareApril 26, 2020 09:25
@timhoffmtimhoffmforce-pushed thescatter-color-error-message branch froma397322 to0c44be6CompareApril 26, 2020 22:52
@QuLogic
Copy link
Member

Is that the right issue number?

@timhoffm
Copy link
MemberAuthor

Ups, fixed the number.

@jklymakjklymak merged commitbe3e477 intomatplotlib:masterApr 29, 2020
@timhoffmtimhoffm deleted the scatter-color-error-message branchApril 29, 2020 17:56
@QuLogicQuLogic mentioned this pull requestMay 15, 2020
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.3.0
Development

Successfully merging this pull request may close these issues.

Misleading error message in _parse_scatter_color_args
3 participants
@timhoffm@QuLogic@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp