fix invalid escape sequences in grouped_data.py #48998
Closed
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.
Why are these changes needed?
This PR fixes the invalid escape sequences in
grouped_data.py
reported in #48921Related issue number
closes #48921, but only partially. It looks like there are many more invalid escape sequences in this code base. This means that the same issue can just re-occur in a different file.The root cause is that the linting ruleW605
is currently globally suppressed:ray/.flake8
Line 29 in 19818cf
A true fix of #48921 would require to enable this lint, and fix them all. If desired, I could look into that in a follow-up.EDIT: After a closer inspection (python/mypy#18215 (comment)) it looks like the error is actually not related to invalid escape sequences, but due to non standard handling of lazy imports. I will address these issues separately in a follow-up.
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.