Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolve
DeprecationWarning
's emitted for invalid escape sequences in python 3.11 and newer.Fixes Issues
Relates to #1293.
This fixes py3.11+ compatibility that arises from invalid escape literals in strings. Raw strings should be used for regexes and other strings that contain legitimate backslahes.
Python library reference.
Or on SO, if you prefer.
I have made sure that no other instances of this error are present in codebase (via
ruff check . --select W605
, here's this rule)Unit test coverage
This issue should be addressed at the linter level. Ready to contribute a linting solution to catch this if authors are ready to accept some linting pipeline (which would be a good thing to do).
Known breaking changes/behaviors
This change is fully backwards-compatible. Sorry for whitespace removed on autosave, I hope it was not so important for you, guys...