Skip to content

Commit dd93cc5

Browse files
goodfeliTorax team
authored andcommitted
better error message
PiperOrigin-RevId: 828076233
1 parent e5b4fc5 commit dd93cc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torax/_src/static_dataclass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ def __post_init__(self):
128128
# Make sure the StaticDataclass method is used
129129
if hash(self) != self._hash():
130130
raise TypeError(
131-
"A subclass of StaticDataclass is not using the base "
131+
f"{type(self)} is not using the base "
132132
"StaticDataclass.__hash__ method. This is usually "
133133
"accidental and caused by forgetting to pass eq=False "
134134
"to the dataclass decorator on the subclass. If this is"
135-
"intentional then override the __post_init__ method too"
135+
" intentional then override the __post_init__ method too"
136136
" to avoid this check."
137137
)
138138

0 commit comments

Comments
 (0)