From 4d3bd389347fb6470afb9844e2b9130f161847e4 Mon Sep 17 00:00:00 2001 From: Ivan Leo Date: Fri, 8 Nov 2024 14:24:36 +0800 Subject: [PATCH] fix: reverted the type:ignore --- instructor/dsl/partial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instructor/dsl/partial.py b/instructor/dsl/partial.py index a6a75b1ba..41b5dc35e 100644 --- a/instructor/dsl/partial.py +++ b/instructor/dsl/partial.py @@ -68,10 +68,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[assignment] tmp_field.default = None - return tmp_field.annotation, tmp_field + return tmp_field.annotation, tmp_field # type: ignore class PartialBase(Generic[T_Model]):