Skip to content

Commit 0182ab1

Browse files
committed
Fix regex for version in pyproject.toml
1 parent 82f04dc commit 0182ab1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/update_version.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def update_version():
3232
# pyproject.toml
3333
with open(os.path.join(pybamm.root_dir(), "pyproject.toml"), "r+") as file:
3434
output = file.read()
35-
replace_version = re.sub('(?<=version = ")(.+)(?=")', release_version, output)
35+
replace_version = re.sub(
36+
r'(?<=\bversion = ")(.+)(?=")', release_version, output
37+
)
3638
file.truncate(0)
3739
file.seek(0)
3840
file.write(replace_version)

0 commit comments

Comments
 (0)