Skip to content

Commit eb4080e

Browse files
Lucas Wimanmvantellingen
authored andcommitted
Annotate regular expression as an r'string'
This prevents an invalid escape sequence warning on newer versions of Python 3: ``` DeprecationWarning: invalid escape sequence \[ match = re.match('([^\[]+)', array_type) ```
1 parent b18a28b commit eb4080e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zeep/xsd/visitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def visit_attribute(self, node, parent):
428428
# Check of wsdl:arayType
429429
array_type = node.get('{http://schemas.xmlsoap.org/wsdl/}arrayType')
430430
if array_type:
431-
match = re.match('([^\[]+)', array_type)
431+
match = re.match(r'([^\[]+)', array_type)
432432
if match:
433433
array_type = match.groups()[0]
434434
qname = as_qname(array_type, node.nsmap)

0 commit comments

Comments
 (0)