File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
hamilton/function_modifiers Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -769,7 +769,6 @@ def validate(self, fn: Callable):
769
769
elif typing_extensions .is_typeddict (output_type ):
770
770
if self .fields is None :
771
771
self .fields = typing .get_type_hints (output_type )
772
- _validate_extract_fields (self .fields )
773
772
else :
774
773
# check that fields is a subset of TypedDict that is defined
775
774
typed_dict_fields = typing .get_type_hints (output_type )
@@ -778,6 +777,7 @@ def validate(self, fn: Callable):
778
777
raise base .InvalidDecoratorException (
779
778
f"Error { self .fields } did not match a subset of the TypedDict annotation's fields { typed_dict_fields } ."
780
779
)
780
+ _validate_extract_fields (self .fields )
781
781
else :
782
782
raise base .InvalidDecoratorException (
783
783
f"For extracting fields, output type must be a dict or typing.Dict, not: { output_type } "
You can’t perform that action at this time.
0 commit comments