Skip to content

Commit fc2ceae

Browse files
authored
Fix regex pattern for Inkscape version parsing
The SyntaxWarning for invalid escape sequences (such as '\.') started as a DeprecationWarning in Python 3.6 and was made into a SyntaxWarning in Python 3.12.
1 parent 693b6ed commit fc2ceae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/inkscape_extension/visicut_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def inkscape_version():
147147
lines = version_raw.splitlines()
148148
version = [line for line in lines if line.startswith("Inkscape ")]
149149
assert len(version) == 1, "inkscape --version did not return a version number: " + version_raw
150-
match = re.match("Inkscape ([0-9]+\.[0-9]+).*", version[0])
150+
match = re.match(r"Inkscape ([0-9]+\.[0-9]+).*", version[0])
151151
assert match is not None, "failed to parse version number from " + version[0]
152152
version_float = float(match.group(1))
153153
return version_float

0 commit comments

Comments
 (0)