We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 710a64b commit 56f37cbCopy full SHA for 56f37cb
src/gitpod/_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