From f10af8bf1da2e12b04b75514bb3dc816762535ec Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 14 Oct 2024 15:49:31 -0700 Subject: [PATCH] remove unnecessary error message --- reflex/vars/base.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/reflex/vars/base.py b/reflex/vars/base.py index 94494dd92..f1ce1e87a 100644 --- a/reflex/vars/base.py +++ b/reflex/vars/base.py @@ -1219,7 +1219,7 @@ class LiteralVar(Var): **kwargs: Additional keyword arguments. Raises: - TypeError: If the subclass is not a subclass of LiteralVar. + TypeError: If the LiteralVar subclass does not have a corresponding Var subclass. """ super().__init_subclass__(**kwargs) @@ -1235,11 +1235,6 @@ class LiteralVar(Var): if issubclass(base, Var) and base != LiteralVar ] - if not issubclass(cls, LiteralVar): - raise TypeError( - f"LiteralVar subclass {cls} must be a subclass of LiteralVar." - ) - if len(possible_bases) != 1: raise TypeError( f"LiteralVar subclass {cls} must have exactly one base class that is a subclass of Var and not LiteralVar."