From dcefbfab6345ed40f0d81be50d76078ff1193fea Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Thu, 5 Dec 2024 15:16:12 +0000 Subject: [PATCH] Use raw strings for regex in release script --- build_utils/release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_utils/release.py b/build_utils/release.py index 8558477a8..2880c83e7 100644 --- a/build_utils/release.py +++ b/build_utils/release.py @@ -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(): @@ -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,