We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 181338a commit f7ae1d5Copy full SHA for f7ae1d5
src/finch/_models.py
@@ -406,6 +406,15 @@ def build(
406
return cast(_BaseModelT, construct_type(type_=base_model_cls, value=kwargs))
407
408
409
+def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
410
+ """Loose coercion to the expected type with construction of nested values.
411
+
412
+ Note: the returned value from this function is not guaranteed to match the
413
+ given type.
414
+ """
415
+ return cast(_T, construct_type(value=value, type_=type_))
416
417
418
def construct_type(*, value: object, type_: object) -> object:
419
"""Loose coercion to the expected type with construction of nested values.
420
0 commit comments