Changeset 4567d1c for buildhelpers/codegen/templates
- Timestamp:
- Jan 3, 2021, 3:45:44 PM (6 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 56d9979
- Parents:
- 2175c7a
- Location:
- buildhelpers/codegen/templates
- Files:
-
- 1 added
- 1 edited
-
typing_utils.mustache (added)
-
util.mustache (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
buildhelpers/codegen/templates/util.mustache
r2175c7a r4567d1c 3 3 import six 4 4 import typing 5 from {{packageName}} import typing_utils 5 6 6 7 … … 16 17 return None 17 18 18 if klass in six.integer_types or klass in (float, str, bool ):19 if klass in six.integer_types or klass in (float, str, bool, bytearray): 19 20 return _deserialize_primitive(data, klass) 20 21 elif klass == object: … … 24 25 elif klass == datetime.datetime: 25 26 return deserialize_datetime(data) 26 elif typ e(klass) == typing.GenericMeta:27 if klass.__extra__ == list:27 elif typing_utils.is_generic(klass): 28 if typing_utils.is_list(klass): 28 29 return _deserialize_list(data, klass.__args__[0]) 29 if klass.__extra__ == dict:30 if typing_utils.is_dict(klass): 30 31 return _deserialize_dict(data, klass.__args__[1]) 31 32 else:
Note:
See TracChangeset
for help on using the changeset viewer.
