Title: Improve error handling in _parse_scatter_color_args by timhoffm · Pull Request #17245 · matplotlib/matplotlib · GitHub
Open Graph Title: Improve error handling in _parse_scatter_color_args by timhoffm · Pull Request #17245 · matplotlib/matplotlib
X Title: Improve error handling in _parse_scatter_color_args by timhoffm · Pull Request #17245 · matplotlib/matplotlib
Description: PR Summary Fixes #17243 The problem was that mcolors.to_rgba_array(c) can raise two categories of ValueErrors. One are generic array conversion-related errors, the other is our own ValueError('RGBA values should be within 0-1 range'). Only the former should be catched and rewritten. Our own ValueError 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 and ValueError seems exactly right for out-of-bounds numbers.
Open Graph Description: PR Summary Fixes #17243 The problem was that mcolors.to_rgba_array(c) can raise two categories of ValueErrors. One are generic array conversion-related errors, the other is our own ValueError('...
X Description: PR Summary Fixes #17243 The problem was that mcolors.to_rgba_array(c) can raise two categories of ValueErrors. One are generic array conversion-related errors, the other is our own ValueError(&...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/17245
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:57991cf4-836e-6c33-7b77-c87974b93bc1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 86E6:35E4DB:32CCF99:45D3407:6A570850 |
| html-safe-nonce | 7ee5cfd59f45e78018370c38d4ecdf512413ae22cf4598fd54008e5f9ce31670 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkU2OjM1RTREQjozMkNDRjk5OjQ1RDM0MDc6NkE1NzA4NTAiLCJ2aXNpdG9yX2lkIjoiODAwMDgwMDY4NTc3NTMyNTI2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 14a3f98424a08d852ff6098a5f43053cf62fb992cfa3f0b5165dd147ceadb087 |
| hovercard-subject-tag | pull_request:408897189 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/17245/files |
| twitter:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| og:image:alt | PR Summary Fixes #17243 The problem was that mcolors.to_rgba_array(c) can raise two categories of ValueErrors. One are generic array conversion-related errors, the other is our own ValueError('... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb29e5f807bd95e41196adfbc6d28f9af12d89830d8b684f3e871774ddff2fc |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b056788a129fb0194b61f2ebb4c43f6a9f4dfd27 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width