sagemaker-core 1.0.15__py3-none-any.whl → 1.0.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sagemaker-core might be problematic. Click here for more details.

@@ -115,16 +115,30 @@ def _evaluate_list_type(raw_list, shape) -> list:
115
115
  """
116
116
  _shape_member_type = shape["member_type"]
117
117
  _shape_member_shape = shape["member_shape"]
118
+ _evaluated_list = []
118
119
  if _shape_member_type in BASIC_TYPES:
119
120
  # if basic types directly assign list value.
120
121
  _evaluated_list = raw_list
121
122
  elif _shape_member_type == STRUCTURE_TYPE:
122
- # if structure type transform each list item and assign value.
123
- _evaluated_list = []
123
+ # if structure type, transform each list item and assign value.
124
124
  # traverse through response list and evaluate item
125
125
  for item in raw_list:
126
126
  _evaluated_item = transform(item, _shape_member_shape)
127
127
  _evaluated_list.append(_evaluated_item)
128
+ elif _shape_member_type == LIST_TYPE:
129
+ # if list type, transform each list item and assign value.
130
+ # traverse through response list and evaluate item
131
+ for item in raw_list:
132
+ _list_type_shape = SHAPE_DAG[_shape_member_shape]
133
+ _evaluated_item = _evaluate_list_type(item, _list_type_shape)
134
+ _evaluated_list.append(_evaluated_item)
135
+ elif _shape_member_type == MAP_TYPE:
136
+ # if structure type, transform each list item and assign value.
137
+ # traverse through response list and evaluate item
138
+ for item in raw_list:
139
+ _map_type_shape = SHAPE_DAG[_shape_member_shape]
140
+ _evaluated_item = _evaluate_map_type(item, _map_type_shape)
141
+ _evaluated_list.append(_evaluated_item)
128
142
  else:
129
143
  raise ValueError(
130
144
  f"Unhandled List member type "