@@ -179,7 +179,7 @@ def _is_list_of_dataclasses_type(dtype: TypeAnnotation) -> bool:
179179 TypeError: If the input is not a valid `TypeAnnotation` type (see above).
180180 """
181181 if not isinstance (dtype , TYPE_ANNOTATION_TYPES ):
182- raise TypeError (f"Expected ` type` , got { type (dtype )} : { dtype } " )
182+ raise TypeError (f"Expected type annotation , got { type (dtype )} : { dtype } " )
183183
184184 origin = get_origin (dtype )
185185 args = get_args (dtype )
@@ -210,7 +210,7 @@ def _is_optional_type(dtype: TypeAnnotation) -> bool:
210210 TypeError: If the input is not a valid `TypeAnnotation` type (see above).
211211 """
212212 if not isinstance (dtype , TYPE_ANNOTATION_TYPES ):
213- raise TypeError (f"Expected ` type` , got { type (dtype )} : { dtype } " )
213+ raise TypeError (f"Expected type annotation , got { type (dtype )} : { dtype } " )
214214
215215 origin = get_origin (dtype )
216216 args = get_args (dtype )
@@ -238,10 +238,10 @@ def _unpack_optional_type(dtype: TypeAnnotation) -> type:
238238 ValueError: If the input type is not `Optional[T]`.
239239 """
240240 if not isinstance (dtype , TYPE_ANNOTATION_TYPES ):
241- raise TypeError (f"Expected ` type` , got { type (dtype )} : { dtype } " )
241+ raise TypeError (f"Expected type annotation , got { type (dtype )} : { dtype } " )
242242
243243 if not _is_optional_type (dtype ):
244- raise ValueError (f"Expected Optional[T], got { type (dtype )} : { dtype } " )
244+ raise ValueError (f"Expected ` Optional[T]` , got { type (dtype )} : { dtype } " )
245245
246246 args = get_args (dtype )
247247
0 commit comments