Skip to content

Commit

Permalink
Use raw string for regex to avoid accidentally escaping characters
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenfontanella committed Dec 17, 2024
1 parent dfb7a61 commit b4d5db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bump-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re

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

0 comments on commit b4d5db8

Please sign in to comment.