From 82b945d1270334d51a1ff6bc6ccdb6134ec9fd02 Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 25 Jul 2019 17:15:24 -0500 Subject: [PATCH] Use raw strings for regex patterns --- wordnik/swagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wordnik/swagger.py b/wordnik/swagger.py index e10527f..eda6871 100644 --- a/wordnik/swagger.py +++ b/wordnik/swagger.py @@ -129,7 +129,7 @@ def deserialize(self, obj, objClass): # native Python type, or one of the model classes. if type(objClass) == str: if 'list[' in objClass: - match = re.match('list\[(.*)\]', objClass) + match = re.match(r'list\[(.*)\]', objClass) subClass = match.group(1) return [self.deserialize(subObj, subClass) for subObj in obj] @@ -164,7 +164,7 @@ def deserialize(self, obj, objClass): setattr(instance, attr, datetime.datetime.strptime(value[:-5], "%Y-%m-%dT%H:%M:%S.%f")) elif 'list[' in attrType: - match = re.match('list\[(.*)\]', attrType) + match = re.match(r'list\[(.*)\]', attrType) subClass = match.group(1) subValues = [] if not value: