Skip to content

utils/compare.py: Fix syntax warning on python 3.12 #96

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

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Feb 20, 2024

As of Python 3.12 there's now a syntax warning for invalid escape sequences:

./utils/compare.py:195: SyntaxWarning: invalid escape sequence '\g'

This fixes it by using a raw string literal, as recommended here:
https://docs.python.org/3/library/re.html

As of Python 3.12 there's now a syntax warning for invalid escape sequences:
./utils/compare.py:195: SyntaxWarning: invalid escape sequence '\g'

This fixes it by using a raw string literal, as recommended here:
https://docs.python.org/3/library/re.html
Copy link
Contributor

@MatzeB MatzeB left a comment

Choose a reason for hiding this comment

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

LGTM

@MatzeB MatzeB merged commit 5148f0b into main Feb 20, 2024
@arichardson arichardson deleted the python312-raw-string-literal branch February 20, 2024 16:32
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