Title: FIX: Return value instead of enum in get_capstyle/_joinstyle by StefRe · Pull Request #22055 · matplotlib/matplotlib · GitHub
Open Graph Title: FIX: Return value instead of enum in get_capstyle/_joinstyle by StefRe · Pull Request #22055 · matplotlib/matplotlib
X Title: FIX: Return value instead of enum in get_capstyle/_joinstyle by StefRe · Pull Request #22055 · matplotlib/matplotlib
Description: PR Summary There's an API inconsistency in the return values of get_capstyle / get_joinstyle: For Line2D, Collections and GraphicsContextBase they return a string whereas for MarkerStyle and Patch they return an enum object, see also #21979 (comment). _enums was introduced in #18544 in mpl 3.4.0 without being mentioned in the release notes. Its documentation states: The classes in this module are used internally and serve to document these concepts formally. From this I conclude that the enum should not leak out to the user, i.e. get_capstyle / get_joinstyle should return as string for MarkerStyle and Patch too. As the change from string to enum as not mentioned in the release note I guess changing it back is not an API change but a bug fix and it doesn't need not be documented (see Checklist below). PR Checklist Tests and Styling [N/A ] Has pytest style unit tests (and pytest passes). Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all). Documentation [N/A] New features are documented, with examples if plot related. [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there). [N/A ] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there). Documentation is sphinx and numpydoc compliant (the docs should build without error).
Open Graph Description: PR Summary There's an API inconsistency in the return values of get_capstyle / get_joinstyle: For Line2D, Collections and GraphicsContextBase they return a string whereas for MarkerStyle and P...
X Description: PR Summary There's an API inconsistency in the return values of get_capstyle / get_joinstyle: For Line2D, Collections and GraphicsContextBase they return a string whereas for MarkerStyle a...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/22055
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3250f875-0c17-c8ee-b6a6-05b2ddcd5165 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 85A6:124012:DEFFC8:12DA1CD:6A5170D9 |
| html-safe-nonce | 9647be4c81c6594e711843f0c00a3eed6e73db25c99394867e59e83e8ad405af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUE2OjEyNDAxMjpERUZGQzg6MTJEQTFDRDo2QTUxNzBEOSIsInZpc2l0b3JfaWQiOiI0MzE1Mjg1OTc2MzEyMjc5MjU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 894cec911fb09afbc7a878466c6d0d1eae470b603697fd76228f910e1a2b947f |
| hovercard-subject-tag | pull_request:810409557 |
| 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/22055/files |
| twitter:image | https://avatars.githubusercontent.com/u/19879328?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/19879328?s=400&v=4 |
| og:image:alt | PR Summary There's an API inconsistency in the return values of get_capstyle / get_joinstyle: For Line2D, Collections and GraphicsContextBase they return a string whereas for MarkerStyle and P... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | b19955a9dd40fd99462443f7911b522d7216776a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width