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

Invalid escape sequence #235

Open
iWantToKeepAnon opened this issue Sep 20, 2024 · 1 comment
Open

Invalid escape sequence #235

iWantToKeepAnon opened this issue Sep 20, 2024 · 1 comment

Comments

@iWantToKeepAnon
Copy link

Describe the bug
configs.py gives SyntaxError: invalid escape sequence '\.' from IS_DEEQU_V1 = re.search("com\.amazon\.deequ\:deequ\:1.*", DEEQU_MAVEN_COORD) is not None

Raw strings or double backslashes are needed.

To Reproduce
This only happens when running pytest and not from the REPL. I have not reproduced this independently yet. But dot and colon are not valid escape sequences.

Expected behavior
No errors from invalid escape sequences.

Desktop (please complete the following information):
macos running 6.10.0-linuxkit docker image.

Additional context

    from pydeequ.configs import SPARK_VERSION
E     File "/root/poetry/venv/lib/python3.10/site-packages/pydeequ/configs.py", line 43
E       IS_DEEQU_V1 = re.search("com\.amazon\.deequ\:deequ\:1.*", DEEQU_MAVEN_COORD) is not None
E                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   SyntaxError: invalid escape sequence '\.'
@iWantToKeepAnon
Copy link
Author

There is no need for a regular expression search here. This would be the same:

IS_DEEQU_V1 = "com.amazon.deequ:deequ:1" in DEEQU_MAVEN_COORD

iWantToKeepAnon pushed a commit to iWantToKeepAnon/python-deequ that referenced this issue Sep 21, 2024
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

No branches or pull requests

1 participant