You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
iftype(value)inallowed_typesandtype(value)isnotstrandtype(value)isnotint:# Return values that have already been converted by a subclass, but not str or int, as that would be premature
175
+
returnvalue
176
+
ifdateinallowed_types:
177
+
try:
178
+
returndate.fromisoformat(str(value))
179
+
exceptValueError:
180
+
error=ValueError("date format does not match ISO 8601")
181
+
iftimeinallowed_types:
182
+
try:
183
+
returntime.fromisoformat(str(value))
184
+
exceptValueError:
185
+
error=ValueError("time format does not match ISO 8601")
170
186
ifdatetimeinallowed_types:
171
187
ifself.datetime_formatisNone:
172
188
try:
173
-
returnparser.parse(str(value))
174
-
exceptparser._parser.ParserError:
175
-
pass
189
+
returndatetime.fromisoformat(str(value))
190
+
exceptValueError:
191
+
error=ValueError("datetime format does not match ISO 8601")