You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest Ruff 039 rule is a bit noisy (see #14527 too), and I think there are false positives: running it on a private codebase, I had a lot of:
_RE_STRIP = re.compile("[ \t\r\n]+")
^^^^^^^^^^ RUF039
= help: Replace with raw string
Unless I missed something, there is no easy way to convert that one to a raw string, as r"\n" is semantically different to "\n" (but I agree that is a good general rule, when possible).
The text was updated successfully, but these errors were encountered:
Thanks for the reply! I guess CPython implemented this to make people's life easier with the raw strings.
It feels a bit weird as it blurs some lines between what is escaped by re and what is escaped when building a string, but I guess as this works, I will close the issue.
The latest Ruff 039 rule is a bit noisy (see #14527 too), and I think there are false positives: running it on a private codebase, I had a lot of:
Unless I missed something, there is no easy way to convert that one to a raw string, as
r"\n"
is semantically different to"\n"
(but I agree that is a good general rule, when possible).The text was updated successfully, but these errors were encountered: