Browse Source

add __repr__ method to MutableProxy (#4506)

benedikt-bartscher 5 months ago
parent
commit
9ff386bf48
1 changed files with 8 additions and 0 deletions
  1. 8 0
      reflex/state.py

+ 8 - 0
reflex/state.py

@@ -3599,6 +3599,14 @@ class MutableProxy(wrapt.ObjectProxy):
         self._self_state = state
         self._self_field_name = field_name
 
+    def __repr__(self) -> str:
+        """Get the representation of the wrapped object.
+
+        Returns:
+            The representation of the wrapped object.
+        """
+        return f"{self.__class__.__name__}({self.__wrapped__})"
+
     def _mark_dirty(
         self,
         wrapped=None,