diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index 57e439e7c..927b01333 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -52,6 +52,7 @@ class Foreach(Component): Raises: ForeachVarError: If the iterable is of type Any. TypeError: If the render function is a ComponentState. + UntypedVarError: If the iterable is of type Any without a type annotation. """ iterable = LiteralVar.create(iterable) if iterable._var_type == Any: diff --git a/reflex/vars/base.py b/reflex/vars/base.py index dbb393071..4097ce789 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -1201,6 +1201,7 @@ class Var(Generic[VAR_TYPE]): Raises: VarAttributeError: If the attribute does not exist. + UntypedVarError: If the var type is Any. TypeError: If the var type is Any. # noqa: DAR101 self