The backslash characters cause syntax warnings, mark the strings are raw
to avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit
f717f61a37ed83618d054fc4017b5f5386fb2e3c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
keyws['tag_number'] = '{tag_number}'
tag_re = format_str(name_pattern, keyws)
# Replace parentheses for proper regex matching
- tag_re = tag_re.replace('(', '\(').replace(')', '\)') + '$'
+ tag_re = tag_re.replace('(', r'\(').replace(')', r'\)') + '$'
# Inject regex group pattern for 'tag_number'
tag_re = tag_re.format(tag_number='(?P<tag_number>[0-9]{1,5})')