Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions reflex/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,12 @@ def is_classvar(a_type: Any) -> bool:
Returns:
Whether the type is a ClassVar.
"""
return a_type is ClassVar or (
type(a_type) is _GenericAlias and a_type.__origin__ is ClassVar
return (
a_type is ClassVar
or (type(a_type) is _GenericAlias and a_type.__origin__ is ClassVar)
or (
type(a_type) is ForwardRef and a_type.__forward_arg__.startswith("ClassVar")
)
)


Expand Down