From f03ccf7ca7146fdf0e046818312f111f570aad9a Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 15 Jan 2025 20:12:48 +0100 Subject: [PATCH] give back default annotations for lambdas --- reflex/event.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reflex/event.py b/reflex/event.py index 1bda1d088..809f9cfc2 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -1360,8 +1360,11 @@ def resolve_annotation(annotations: dict[str, Any], arg_name: str, spec: ArgsSpe The resolved annotation. """ annotation = annotations.get(arg_name) - if annotation is None and not isinstance(spec, types.LambdaType): - raise MissingAnnotationError(var_name=arg_name) + if annotation is None: + if not isinstance(spec, types.LambdaType): + raise MissingAnnotationError(var_name=arg_name) + else: + return dict[str, dict] return annotation