rspec/rules/S1717/python/rule.adoc
2021-04-28 16:49:39 +02:00

21 lines
490 B
Plaintext

Typically, backslashes are seen only as part of escape sequences. Therefore, the use of a backslash outside of a raw string or escape sequence looks suspiciously like a broken escape sequence.
Characters recognized as escape-able are: ``++abfnrtvox\'"++``
== Noncompliant Code Example
----
s = "Hello \world."
t = "Nice to \ meet you"
u = "Let's have \ lunch"
----
== Compliant Solution
----
s = "Hello world."
t = "Nice to \\ meet you"
u = r"Let's have \ lunch" // raw string
----