Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
(De-Duplication) linking validate hatch from hatch module#28076
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
base:main
Are you sure you want to change the base?
Changes from1 commit
522f892
c57111a
0c542d6
4e8cd24
23b55a2
8b109bd
50e5910
50ff42d
9f7d527
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -182,6 +182,8 @@ def __init__(self, hatch, density): | ||||||||||||||||||||||||
def _validate_hatch_pattern(hatch): | ||||||||||||||||||||||||
valid_hatch_patterns = set(r'-+|/\xXoO.*') | ||||||||||||||||||||||||
if hatch is not None: | ||||||||||||||||||||||||
if not isinstance(hatch, str): | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This is an subtle API change that needs to be document as currently b.set_hatch(('x','x')) works. The docstring on We do run the hatches through an lrucache so only hashable things work (and it looks like we used as a key in a dictionary before that). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Working on it,
Could you break it down for me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. matplotlib/lib/matplotlib/path.py Lines 1025 to 1035 in199c31f
Is part of the code path between | ||||||||||||||||||||||||
raise ValueError("Hatch pattern must be a string") | ||||||||||||||||||||||||
invalids = set(hatch).difference(valid_hatch_patterns) | ||||||||||||||||||||||||
if invalids: | ||||||||||||||||||||||||
valid = ''.join(sorted(valid_hatch_patterns)) | ||||||||||||||||||||||||