We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6afe91 commit 42ed0b1Copy full SHA for 42ed0b1
src/finch/_utils/_utils.py
@@ -72,8 +72,16 @@ def _extract_items(
72
from .._files import assert_is_file_content
73
74
# We have exhausted the path, return the entry we found.
75
- assert_is_file_content(obj, key=flattened_key)
76
assert flattened_key is not None
+
77
+ if is_list(obj):
78
+ files: list[tuple[str, FileTypes]] = []
79
+ for entry in obj:
80
+ assert_is_file_content(entry, key=flattened_key + "[]" if flattened_key else "")
81
+ files.append((flattened_key + "[]", cast(FileTypes, entry)))
82
+ return files
83
84
+ assert_is_file_content(obj, key=flattened_key)
85
return [(flattened_key, cast(FileTypes, obj))]
86
87
index += 1
0 commit comments