From d06f540f82bd3c2c399efc2c923d3153815cc501 Mon Sep 17 00:00:00 2001 From: Ivan Leo Date: Sun, 24 Nov 2024 10:42:50 +0800 Subject: [PATCH] fix: adding type ignore for pyright --- 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 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]):