diff --git a/instructor/dsl/partial.py b/instructor/dsl/partial.py index d2b353d3a..95dcb9bb0 100644 --- a/instructor/dsl/partial.py +++ b/instructor/dsl/partial.py @@ -106,10 +106,10 @@ def _make_field_optional( tmp_field.annotation = Optional[Partial[annotation, MakeFieldsOptional]] # type: ignore[assignment, valid-type] tmp_field.default = {} else: - tmp_field.annotation = Optional[field.annotation] + tmp_field.annotation = Optional[field.annotation] # type:ignore tmp_field.default = None - return tmp_field.annotation, tmp_field + return tmp_field.annotation, tmp_field # type: ignore class PartialBase(Generic[T_Model]):