Skip to content

Commit 81e33ab

Browse files
Use raw strings for regex (#3654)
1 parent e52fc5c commit 81e33ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codespell_lib/_codespell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# these may occur unescaped in URIs, and so we are more restrictive on the
5959
# endpoint. Emails are more restrictive, so the endpoint remains flexible.
6060
uri_regex_def = (
61-
"(\\b(?:https?|[ts]?ftp|file|git|smb)://[^\\s]+(?=$|\\s)|\\b[\\w.%+-]+@[\\w.-]+\\b)"
61+
r"(\b(?:https?|[ts]?ftp|file|git|smb)://[^\s]+(?=$|\s)|\b[\w.%+-]+@[\w.-]+\b)"
6262
)
6363
inline_ignore_regex = re.compile(r"[^\w\s]\s?codespell:ignore\b(\s+(?P<words>[\w,]*))?")
6464
USAGE = """

0 commit comments

Comments
 (0)