Skip to content

Commit 02bdbf4

Browse files
committed
hide __getattribute__ from type checking
1 parent 1e71398 commit 02bdbf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

reflex/state.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ def _check_overwritten_dynamic_args(cls, args: list[str]):
13501350
for substate in cls.get_substates():
13511351
substate._check_overwritten_dynamic_args(args)
13521352

1353-
def __getattribute__(self, name: str) -> Any:
1353+
def _get_attribute(self, name: str) -> Any:
13541354
"""Get the state var.
13551355
13561356
If the var is inherited, get the var from the parent state.
@@ -1408,6 +1408,9 @@ def __getattribute__(self, name: str) -> Any:
14081408

14091409
return value
14101410

1411+
if not TYPE_CHECKING:
1412+
__getattribute__ = _get_attribute
1413+
14111414
def __setattr__(self, name: str, value: Any):
14121415
"""Set the attribute.
14131416

0 commit comments

Comments
 (0)