Skip to content

Commit b4d5db8

Browse files
Use raw string for regex to avoid accidentally escaping characters
1 parent dfb7a61 commit b4d5db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bump-version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44

55
def get_curr_version(cabal_contents, file_name):
6-
match = re.search("version:\s*([\d.]+)", cabal_contents)
6+
match = re.search(r"version:\s*([\d.]+)", cabal_contents)
77
if match is None:
88
raise ValueError(f"No version found in {file_name}")
99
return match.group(1)

0 commit comments

Comments
 (0)