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

chore: update regexp to treat string as raw, eliminating warnings #56

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

ndobbs
Copy link
Contributor

@ndobbs ndobbs commented Sep 27, 2024

Fixes: #57

This PR attempts to fix a SyntaxWarning that's raised from the library due to an invalid escape sequence in the pattern used in re.findall()

The backslash before the square bracket in the string was not being handled properly. This is resolved by prefixing it with r, suring that the backslash is treated literally.

error output

/venv/lib/python3.12/site-packages/metabase_api/metabase_api.py:211: SyntaxWarning: invalid escape sequence '\['
  res = re.findall("\['field', .*?\]", query_data_str)

@vvaezian vvaezian merged commit 6273cca into vvaezian:master Sep 28, 2024
1 check passed
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.

SyntaxWarning when attempting to find column IDs
2 participants