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

Change W605 autofix to use raw strings if possible #5061

Closed
hauntsaninja opened this issue Jun 13, 2023 · 0 comments · Fixed by #5352
Closed

Change W605 autofix to use raw strings if possible #5061

hauntsaninja opened this issue Jun 13, 2023 · 0 comments · Fixed by #5352
Labels
fixes Related to suggested fixes for violations

Comments

@hauntsaninja
Copy link
Contributor

If a string contains no valid escape sequences, it would be nice to fix by turning the string into a raw string, instead of escaping the backslash. For the common cases of regular expressions and latex, this improves readability.

@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Jun 13, 2023
hauntsaninja added a commit to hauntsaninja/ruff that referenced this issue Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants