add __repr__ method to MutableProxy (#4506)

This commit is contained in:
benedikt-bartscher 2024-12-10 00:17:51 +01:00 committed by GitHub
parent 3d89d74bdc
commit 9ff386bf48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,