We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 062a74b commit 8cb2a3bCopy full SHA for 8cb2a3b
src/orb/_utils/_transform.py
@@ -311,6 +311,11 @@ async def _async_transform_recursive(
311
# Iterable[T]
312
or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
313
):
314
+ # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
315
+ # intended as an iterable, so we don't transform it.
316
+ if isinstance(data, dict):
317
+ return cast(object, data)
318
+
319
inner_type = extract_type_arg(stripped_type, 0)
320
return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
321
0 commit comments