Closed
Description
As part of #61659, the topic of raw strings was brought up.
Currently ?'
and ?"
are used for defining a raw/non-escaped string literal. This is problematic because:
- usage of single quote has been deprecated/removed
'
and thus should?'
?"
makes it hard to define regex/patterns containing double quotes?
is a valid regex character and while it is not conflicting, it can be confusing to the user:
?"?ab"
The proposal is to replace raw-string declaration with triple quotes, """
since the same character (double quotes "
) is used and the risk of clashes (and thus forcing escaping) is minimal.
Based on the info in #61659, there are 21 rules, 0.8% that use ?"
and 8 rules/0.33% that use ?'
from an total of 2389 rules.
That's a total of 29 rules or 1.13% that will be affected by this change.