Skip to content

Commit

Permalink
Use raw strings for regex in release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjackson committed Dec 5, 2024
1 parent b41451e commit dcefbfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_utils/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def release_github(test=True):

euphonic_ver = 'v' + __version__
version_dict = {}
version_dict['CHANGELOG.rst'] = re.findall('\n`(v\d+\.\d+\.\S+)\s',
version_dict['CHANGELOG.rst'] = re.findall(r'\n`(v\d+\.\d+\.\S+)\s',
changelog)[0]
version_dict['CITATION.cff'] = 'v' + citation['version']
for ver_name, ver in version_dict.items():
Expand All @@ -35,7 +35,7 @@ def release_github(test=True):
f'euphonic.__version__: {euphonic_ver} {ver_name}: '
f'{ver}'))

desc = re.search('`v\d+\.\d+\.\S+.*?^-+\n(.*?)^`v', changelog,
desc = re.search(r'`v\d+\.\d+\.\S+.*?^-+\n(.*?)^`v', changelog,
re.DOTALL | re.MULTILINE).groups()[0].strip()
payload = {
"tag_name": euphonic_ver,
Expand Down

0 comments on commit dcefbfa

Please sign in to comment.