From 9a09176d3913bf20b1566031085404b6605720e7 Mon Sep 17 00:00:00 2001 From: ringeringeraja Date: Sat, 26 Aug 2023 16:03:33 -0300 Subject: [PATCH] feat: model.cast to allow dict[str, Any] --- src/micromodel/micromodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/micromodel/micromodel.py b/src/micromodel/micromodel.py index c75efe5..df66f64 100644 --- a/src/micromodel/micromodel.py +++ b/src/micromodel/micromodel.py @@ -13,7 +13,7 @@ def __init__(self, model_type: typing.Callable[[typing.Any], T], ct: dict[str, t self.model_type = model_type self.ct = ct - def cast(self, target: T | dict[typing.Never, typing.Never]): return typing.cast(T, target) + def cast(self, target: T | dict[str, typing.Any]): return typing.cast(T, target) def validate(self, target: T, options: ValidationOptions = {}): return validate(self.model_type, typing.cast(typing.Any, target), options, self.ct) def raise_missing_key(k: int | str):