1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00
Daniel P. Berrangé d5c5d8af45 python: mark regex strings with 'r' prefix
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>
2019-11-11 14:24:19 +00:00
..
2016-11-21 13:15:12 +01:00
2019-11-05 12:12:14 +01:00
2019-06-20 17:01:44 +02:00
2019-08-29 12:46:33 +01:00
2017-10-16 10:22:34 +01:00
2019-09-03 15:37:54 -06:00
2018-05-03 12:40:37 +01:00
2019-04-09 16:59:49 +02:00
2019-09-03 15:37:54 -06:00
2019-08-28 13:39:26 +02:00
2018-12-17 17:52:46 +01:00
2018-12-17 17:52:46 +01:00
2019-08-28 13:39:26 +02:00
2019-10-22 22:15:02 +02:00
2017-08-02 15:00:28 -04:00
2019-08-28 13:39:26 +02:00
2019-07-09 10:42:39 -05:00
2019-11-08 11:41:41 -05:00