8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 385c772 commit 1914be1Copy full SHA for 1914be1
src/cloudflare/_utils/_transform.py
@@ -316,6 +316,11 @@ async def _async_transform_recursive(
316
# Iterable[T]
317
or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
318
):
319
+ # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
320
+ # intended as an iterable, so we don't transform it.
321
+ if isinstance(data, dict):
322
+ return cast(object, data)
323
+
324
inner_type = extract_type_arg(stripped_type, 0)
325
return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
326
0 commit comments