diff --git a/src/micromodel/micromodel.py b/src/micromodel/micromodel.py index fe59539..c75efe5 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): return target + def cast(self, target: T | dict[typing.Never, typing.Never]): 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):