Ignore custom __repr__
for a dataclass
#3026
Replies: 1 comment
-
I was actually using dataclasses indirectly, and the lib that created them was setting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a dataclass that inherits from a class that defines a custom
__repr__
.Rich should be able to format dataclasses nicely, but I believe it's seeing that it already has a custom
__repr__
, and is choosing to use it instead.The custom
__repr__
returns a long string with no line breaks, though.I wanted Rich to ignore it completely, and format it as if it was a normal dataclass with no custom
__repr__
.Beta Was this translation helpful? Give feedback.
All reactions