remove unnecessary error message

This commit is contained in:
Khaleel Al-Adhami 2024-10-14 15:49:31 -07:00
parent 5662612035
commit f10af8bf1d

View File

@ -1219,7 +1219,7 @@ class LiteralVar(Var):
**kwargs: Additional keyword arguments. **kwargs: Additional keyword arguments.
Raises: 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) super().__init_subclass__(**kwargs)
@ -1235,11 +1235,6 @@ class LiteralVar(Var):
if issubclass(base, Var) and base != LiteralVar 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: if len(possible_bases) != 1:
raise TypeError( raise TypeError(
f"LiteralVar subclass {cls} must have exactly one base class that is a subclass of Var and not LiteralVar." f"LiteralVar subclass {cls} must have exactly one base class that is a subclass of Var and not LiteralVar."