From d4bb3ed7345eafe65038d0a9758cb0022a1ff691 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 20 Nov 2024 20:19:48 +0100 Subject: [PATCH] more typings --- reflex/model.py | 2 +- reflex/vars/sequence.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/reflex/model.py b/reflex/model.py index 4b070ec67..c40fdf3f5 100644 --- a/reflex/model.py +++ b/reflex/model.py @@ -171,7 +171,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue super().__init_subclass__() @classmethod - def _dict_recursive(cls, value): + def _dict_recursive(cls, value: Any): """Recursively serialize the relationship object(s). Args: diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py index 8921bedcd..768d0114d 100644 --- a/reflex/vars/sequence.py +++ b/reflex/vars/sequence.py @@ -1582,7 +1582,9 @@ def array_contains_field_operation( @var_operation -def array_contains_operation(haystack: ArrayVar, needle: Any | Var): +def array_contains_operation( + haystack: ArrayVar, needle: Any | Var +) -> CustomVarOperationReturn[bool]: """Check if an array contains an element. Args: @@ -1625,7 +1627,7 @@ if TYPE_CHECKING: def map_array_operation( array: ArrayVar[ARRAY_VAR_TYPE], function: FunctionVar, -): +) -> CustomVarOperationReturn[List[Any]]: """Map a function over an array. Args: