Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix whitespace removal in format check #1844

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

mr-tz
Copy link
Collaborator

@mr-tz mr-tz commented Nov 10, 2023

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

@@ -65,7 +65,7 @@ def extract_format(buf) -> Iterator[Tuple[Feature, Address]]:
yield Format(FORMAT_FREEZE), NO_ADDRESS
elif buf.startswith(MATCH_RESULT):
yield Format(FORMAT_RESULT), NO_ADDRESS
elif re.sub(rb"\w", b"", buf[:20]).startswith(MATCH_JSON_OBJECT):
elif re.sub(rb"\s", b"", buf[:20]).startswith(MATCH_JSON_OBJECT):
Copy link
Collaborator Author

@mr-tz mr-tz Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\w matches any word character (equivalent to [a-zA-Z0-9_])

\s matches any whitespace character (equivalent to [\r\n\t\f\v ])

@mr-tz mr-tz merged commit dee0aa7 into dynamic-feature-extraction Nov 11, 2023
17 checks passed
@mr-tz mr-tz deleted the mr-tz-patch-1 branch November 11, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants