Skip to content

Commit ec8d15f

Browse files
badmonster0chardoncs
authored andcommitted
fix: allow not-annotated args to be compatible for old handlers for now (cocoindex-io#529)
1 parent 3b68934 commit ec8d15f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/cocoindex/flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ async def _update_flow(name: str, fl: Flow) -> tuple[str, _engine.IndexUpdateInf
657657

658658
def _get_data_slice_annotation_type(data_slice_type: Type[DataSlice[T]]) -> Type[T] | None:
659659
type_args = get_args(data_slice_type)
660-
if data_slice_type is DataSlice:
660+
if data_slice_type is inspect.Parameter.empty or data_slice_type is DataSlice:
661661
return None
662662
if get_origin(data_slice_type) != DataSlice or len(type_args) != 1:
663663
raise ValueError(f"Expect a DataSlice[T] type, but got {data_slice_type}")

0 commit comments

Comments
 (0)