Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit ffe7c7b

Browse files
llimehtNeilFraser
authored andcommitted
Use raw string for regex
Prevents warnings being emitted with recent python versions.
1 parent a6367d7 commit ffe7c7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python3/diff_match_patch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,7 @@ def patch_fromText(self, textline):
18041804
return patches
18051805
text = textline.split('\n')
18061806
while len(text) != 0:
1807-
m = re.match("^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$", text[0])
1807+
m = re.match(r"^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$", text[0])
18081808
if not m:
18091809
raise ValueError("Invalid patch string: " + text[0])
18101810
patch = patch_obj()

0 commit comments

Comments
 (0)