Skip to content

Commit f0cd66c

Browse files
chore(internal): fix list file params
1 parent 102ccf2 commit f0cd66c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/oxp/_utils/_utils.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,16 @@ def _extract_items(
7272
from .._files import assert_is_file_content
7373

7474
# We have exhausted the path, return the entry we found.
75-
assert_is_file_content(obj, key=flattened_key)
7675
assert flattened_key is not None
76+
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)
7785
return [(flattened_key, cast(FileTypes, obj))]
7886

7987
index += 1

0 commit comments

Comments
 (0)