1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-12-03 16:23:46 +03:00

generator: Use raw-string for regular expression

"\(" is not a valid escape sequence for a Python string, but currently
is passed on unmodified. This might breaks in the future when new escape
sequences are introduced.

> generator.py:1001:7: W605 invalid escape sequence '\('
> generator.py:1001:18: W605 invalid escape sequence '\)'

Use raw python string instead.

Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
Philipp Hahn
2020-07-26 06:12:29 +02:00
committed by Jano Tomko
parent bc486beb0d
commit 8b8b394555

View File

@@ -1139,7 +1139,7 @@ def is_integral_type(name):
def is_optional_arg(info):
return re.search("^\(?optional\)?", info) is not None
return re.search(r"^\(?optional\)?", info) is not None
def is_python_noninteger_type(name):