You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was playing in the REPL with attrs, and I noticed that if I have a custom __repr__ on an attrs class, then rich will ignore it when displaying an instance of the class or when using rich.print:
The same thing happens when using rich.print in a script:
fromattrsimportdefinefromrichimportprintasrprint@defineclassFoo:
def__repr__(self) ->str:
return"What"print(Foo()) # prints "What"rprint(Foo()) # prints "Foo()"