| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -180,7 +180,7 @@ def __init__(self, hatch, density): | |
|
|
||
|
|
||
| def _validate_hatch_pattern(hatch): | ||
| valid_hatch_patterns = set(r'-+|/\xXoO.*') | ||
| valid_hatch_patterns = set(r'-+|/\xXoO.*').union({None}) | ||
|
Comment thread
Copy link
Copy Markdown
Member
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitywhy do you need to add None if next line you only validate if not none?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIn the case of a list of Nones, the set function makes it into a singleton set with None. So it fails the if hatch is not None:condition
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityOk, but then I think you don't need the if hatch is not None anymore and can just go straight to validation
Sorry, something went wrong.
All reactions
|
||
| if hatch is not None: | ||
| invalids = set(hatch).difference(valid_hatch_patterns) | ||
| if invalids: | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualityhow are new colors assigned if not passed in as part of the original patches?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.