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 invalid escape sequences in grouped_data.py #48998

Conversation

bluenote10
Copy link
Contributor

@bluenote10 bluenote10 commented Nov 30, 2024

Why are these changes needed?

This PR fixes the invalid escape sequences in grouped_data.py reported in #48921

Related 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 rule W605 is currently globally suppressed:

ray/.flake8

Line 29 in 19818cf

W605

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

  • 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_invalid_escape_sequences_in_grouped_data branch from 1bb85d9 to 74e5b87 Compare November 30, 2024 09:14
@bluenote10
Copy link
Contributor Author

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.

@bluenote10 bluenote10 closed this Dec 1, 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

Successfully merging this pull request may close these issues.

mypy type checking with Ray fails due to non-standard import logic
1 participant