mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-01 20:05:46 +00:00
d5c5d8af45
When writing regexes special regex matches like "\d" can get misinterpreted as normal string escape sequences: docs/apibuild.py:1359:51: W605 invalid escape sequence '\d' value = value + re.sub("^(\d+)U$", "\\1", token[1]) ^ docs/apibuild.py:2134:31: W605 invalid escape sequence '\(' m = re.match("\(?1<<(\d+)\)?", info[0]) ^ docs/apibuild.py:2134:38: W605 invalid escape sequence '\d' m = re.match("\(?1<<(\d+)\)?", info[0]) ^ docs/apibuild.py:2134:42: W605 invalid escape sequence '\)' m = re.match("\(?1<<(\d+)\)?", info[0]) ^ To avoid this probem all regexes should use the r"...." syntax for their strings, which disables normal string escape sequences. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> |
||
---|---|---|
.. | ||
check-spacing.pl | ||
header-ifdef.pl | ||
mock-noinline.pl | ||
prohibit-duplicate-header.pl | ||
syntax-check.mk | ||
useless-if-before-free | ||
vc-list-files |