|
@@ -149,6 +149,10 @@ class Var(ABC):
|
|
utils._issubclass(self.type_, Union[List, Dict])
|
|
utils._issubclass(self.type_, Union[List, Dict])
|
|
or utils.is_dataframe(self.type_)
|
|
or utils.is_dataframe(self.type_)
|
|
):
|
|
):
|
|
|
|
+ if self.type_ == Any:
|
|
|
|
+ raise TypeError(
|
|
|
|
+ f"Could not index into var of type Any. (If you are trying to index into a state var, add a type annotation to the var.)"
|
|
|
|
+ )
|
|
raise TypeError(
|
|
raise TypeError(
|
|
f"Var {self.name} of type {self.type_} does not support indexing."
|
|
f"Var {self.name} of type {self.type_} does not support indexing."
|
|
)
|
|
)
|