Skip to content

Commit d5b6542

Browse files
committed
use raw string
1 parent d521ea7 commit d5b6542

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/antlib/scripts/parse_version

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ def snapshot_logic(omero_version):
7070
7171
See gh-67 for the discussion.
7272
"""
73-
m = re.match((
73+
re.compile()
74+
m = re.match(r(
7475
"^"
7576
"(?P<BASE>.*?)"
76-
"(?P<STRIP>([-]DEV)?-\\d+-[a-f0-9]+?(-dirty)?)"
77+
"(?P<STRIP>([-]DEV)?-\d+-[a-f0-9]+?(-dirty)?)"
7778
"(?P<ICE>-ice[0-9]+)?"
7879
"$"), omero_version)
7980
if m:
@@ -115,7 +116,7 @@ def incr_version(omero_version):
115116
omero_version = new_vers
116117
except:
117118
# But if that doesn't work, we brute force with regex
118-
m = re.match("^([^\\d]*\\d+[.]\\d+[.])(\\d+)-SNAPSHOT$", omero_version)
119+
m = re.match(r"^([^\d]*\\d+[.]\d+[.])(\d+)-SNAPSHOT$", omero_version)
119120
if m:
120121
next = int(m.group(2)) + 1
121122
omero_version = "%s%s-SNAPSHOT" % (m.group(1), next)

0 commit comments

Comments
 (0)