Skip to content

Commit 902c445

Browse files
committed
Fix warning about invalid escaped character in re.sub
1 parent 419ff68 commit 902c445

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp2py/wrap_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(self, signature, calling_pattern = None, no_self_c = False, is_cons
106106
## Analyse signature.
107107
self.args, self.namespace = [], ''
108108
if isinstance(signature, str) : # it is a string, we analyse it to get the rtype, and args
109-
signature = re.sub('operator\(\s*\)','__operator_call',signature) # temp. replacement, to make the regex easier
109+
signature = re.sub(r"operator\(\s*\)","__operator_call",signature) # temp. replacement, to make the regex easier
110110
m = re.match(r"\s*(.*?)\s*\((.*)\)",signature)
111111
self.rtype, args = m.group(1).strip() or None, m.group(2).strip()
112112
# extract the c_name if present

0 commit comments

Comments
 (0)