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

fix all invalid escape sequences #49004

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bluenote10
Copy link

Why are these changes needed?

This PR fixes all invalid escape sequences, and enables the corresponding flake8 rule W605.

This came up as part of #48921, leading to the wrong conclusion that the mypy hiccup is related to invalid escape sequences. Most likely it isn't (python/mypy#18215 (comment)), but it may still be a good idea to get rid of these to avoid unnecessary warnings and confusion.

I couldn't really figure out how flake8 is executed by the CI, because just running flake8 on the master branch actually fails, and running scripts/format.sh doesn't seem to do anything (most likely because it only checks the diff, and isn't a full check). So I'm wondering if enabling the W605 check currently actually has much of an effect.

Related issue number

Related to #48921

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@bluenote10 bluenote10 force-pushed the fix_all_invalid_escape_sequences branch from 4e7e167 to ee9f0c7 Compare December 1, 2024 20:31
Signed-off-by: Fabian Keller <[email protected]>
@alexeykudinkin
Copy link
Contributor

@bluenote10 thank you very much for doing the clean up!

Can you please take a look at the CI failures?

Signed-off-by: Fabian Keller <[email protected]>
@bluenote10
Copy link
Author

@bluenote10 thank you very much for doing the clean up!

With pleasure 😉

Can you please take a look at the CI failures?

Good catch: There were actually a few regexes where the \ was partially escaped and non-escaped. I've re-checked them all, and hope they are now all fixed.

@jcotant1 jcotant1 added the data Ray Data-related issues label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Ray Data-related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants