Title: [MNT]: de-duplicate hatch validation · Issue #24797 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: de-duplicate hatch validation · Issue #24797 · matplotlib/matplotlib
X Title: [MNT]: de-duplicate hatch validation · Issue #24797 · matplotlib/matplotlib
Description: Summary In #17926 code to validate hatches got added to the hatch module: matplotlib/lib/matplotlib/hatch.py Lines 182 to 196 in 5100378 def _validate_hatch_pattern(hatch): valid_hatch_patterns = set(r'-+|/\xXoO.*') if hatch is not None:...
Open Graph Description: Summary In #17926 code to validate hatches got added to the hatch module: matplotlib/lib/matplotlib/hatch.py Lines 182 to 196 in 5100378 def _validate_hatch_pattern(hatch): valid_hatch_patterns = s...
X Description: Summary In #17926 code to validate hatches got added to the hatch module: matplotlib/lib/matplotlib/hatch.py Lines 182 to 196 in 5100378 def _validate_hatch_pattern(hatch): valid_hatch_patterns = s...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/24797
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: de-duplicate hatch validation","articleBody":"### Summary\n\nIn #17926 code to validate hatches got added to the hatch module:\r\nhttps://github.com/matplotlib/matplotlib/blob/5100378d3f59d6b715ec62a746f12663541efd96/lib/matplotlib/hatch.py#L182-L196\r\n\r\nand there's near identical code in rc validation that went in in #4686:\r\nhttps://github.com/matplotlib/matplotlib/blob/509315008ce383f7fb5b2dbbdc2a5a966dd83aad/lib/matplotlib/rcsetup.py#L580-L592\r\n\r\nThey diverge slightly in that the hatch version has a deprecation warning but I think it should also apply to the rc version?\n\n### Proposed fix\n\nMake the validation function in hatch.py the canonical validator and either deprecate the rcsetup validation function or turn it into a thin shim over the one in hatch.","author":{"url":"https://github.com/story645","@type":"Person","name":"story645"},"datePublished":"2022-12-21T05:51:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/24797/matplotlib/issues/24797"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:253a51af-6cc2-fcac-b26c-0f77a253e01b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABAE:1ED861:4F3E9B:681B2D:6A52FF14 |
| html-safe-nonce | b5b5ea731a3dcb878721c4ab50659796ecf1a3da4d497eb577412f5f22fad761 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkFFOjFFRDg2MTo0RjNFOUI6NjgxQjJEOjZBNTJGRjE0IiwidmlzaXRvcl9pZCI6IjMwNzA2MzE3Njk5MjM1ODM3NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fd5ed15335cd891b60f10ccb46dec4f274367675184c2bbc43ed7852c6dd6a2d |
| hovercard-subject-tag | issue:1505748149 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/24797/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e8285646ff351a3381899dca15e865126c7c8db364dcb74b539ef89edac66ec5/matplotlib/matplotlib/issues/24797 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e8285646ff351a3381899dca15e865126c7c8db364dcb74b539ef89edac66ec5/matplotlib/matplotlib/issues/24797 |
| og:image:alt | Summary In #17926 code to validate hatches got added to the hatch module: matplotlib/lib/matplotlib/hatch.py Lines 182 to 196 in 5100378 def _validate_hatch_pattern(hatch): valid_hatch_patterns = s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | story645 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width