Commit f3b38730 authored by Spiros Koulouzis's avatar Spiros Koulouzis

uncomment GenericMeta

parent ee30ecbd
......@@ -23,16 +23,16 @@ def _deserialize(data, klass):
return deserialize_date(data)
elif klass == datetime.datetime:
return deserialize_datetime(data)
# elif type(klass) == typing.GenericMeta:
# if klass.__extra__ == list:
# return _deserialize_list(data, klass.__args__[0])
# if klass.__extra__ == dict:
# return _deserialize_dict(data, klass.__args__[1])
elif hasattr(klass, '__origin__'):
if klass.__origin__ == list:
elif type(klass) == typing.GenericMeta:
if klass.__extra__ == list:
return _deserialize_list(data, klass.__args__[0])
if klass.__origin__ == dict:
if klass.__extra__ == dict:
return _deserialize_dict(data, klass.__args__[1])
# elif hasattr(klass, '__origin__'):
# if klass.__origin__ == list:
# return _deserialize_list(data, klass.__args__[0])
# if klass.__origin__ == dict:
# return _deserialize_dict(data, klass.__args__[1])
else:
return deserialize_model(data, klass)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment