Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
f3b38730
Commit
f3b38730
authored
Jun 03, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uncomment GenericMeta
parent
ee30ecbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
util.py
sure_tosca-flask-server/sure_tosca/util.py
+8
-8
No files found.
sure_tosca-flask-server/sure_tosca/util.py
View file @
f3b38730
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment