Skip to content

Commit 8dee62e

Browse files
authored
Make sure building core types for list element struct with full info (#336)
1 parent b149584 commit 8dee62e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

python/cocoindex/typing.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,7 @@ def _encode_type(type_info: AnalyzedTypeInfo) -> dict[str, Any]:
183183
if type_info.elem_type is None:
184184
raise ValueError(f"{type_info.kind} type must have an element type")
185185
row_type_info = analyze_type_info(type_info.elem_type)
186-
if row_type_info.dataclass_type is None:
187-
raise ValueError(f"{type_info.kind} type must have a dataclass type")
188-
encoded_type['row'] = {
189-
'fields': _encode_fields_schema(row_type_info.dataclass_type),
190-
}
186+
encoded_type['row'] = _encode_type(row_type_info)
191187

192188
return encoded_type
193189

0 commit comments

Comments
 (0)