From 9767208c9717eb78ea9056225a7a107b396b8ced Mon Sep 17 00:00:00 2001 From: J Adams Date: Sun, 10 May 2026 22:57:56 -0400 Subject: [PATCH] Fixed swagger.py exceptions On lines 132 and 167 changed to raw strings; on line 165 removed '.%f' from date format string. All three were raising exceptions. --- wordnik/swagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wordnik/swagger.py b/wordnik/swagger.py index 34864b5..638916a 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(f'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")) elif 'list[' in attrType: - match = re.match('list\[(.*)\]', attrType) + match = re.match(f'list\[(.*)\]', attrType) subClass = match.group(1) subValues = [] if not value: