Skip to content

Commit 67da967

Browse files
ilaifMidnighter
andcommitted
feat: add a general string representation
Co-authored-by: Midnighter <[email protected]>
1 parent c3bde30 commit 67da967

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/structurizr/abstract_base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ class AbstractBase(ABC):
2828
def __hash__(self) -> int:
2929
"""Return an integer that represents a unique hash value for this instance."""
3030
return id(self)
31+
32+
def __repr__(self) -> str:
33+
"""Return a string representation of this instance."""
34+
return f"{type(self).__name__}({id(self)})"

0 commit comments

Comments
 (0)