Refactor string literals with \\
into raw strings (where appropriate)
#7997
brettcannon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Came in a code review for
re.split("\\.|-", package_json["version"])
. The"\\.|-"
could ber"\.|-"
which is easier to read. Need to be careful to not change the meaning, but for string literals representing regular expressions or Windows file paths, using raw strings is typically preferred.Beta Was this translation helpful? Give feedback.
All reactions