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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user