-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] print does not work well with DefaultDict #2988
Comments
I can't reproduce this with recent Rich:
|
I hope we solved your problem. If you like using Rich, you might also enjoy Textual |
Yes, since this issue wasn't responded in a long period, I did some hack in chanfig as a temporary solution. See more at ZhiyuanChen/CHANfiG@3155769. However, this is still an issue. |
I'm going to need a minimal reproducible example, because Rich does work with default dict as you can see here: >>> from collections import defaultdict
>>> d=defaultdict(str)
>>> d["foo"] = "bar"
>>> from rich import print
>>> print(d)
defaultdict(<class 'str'>, {'foo': 'bar'}) |
Thank you. Could you please try use chanfig <= 0.0.81? |
Describe the bug
rich.print
inspects__rich__
andaihwerij235234ljsdnp34ksodfipwoe234234jlskjdf
of object during printing.However, it does not inspect if the
__getattr__
of object will always returns something.ipython
avoids this behaviour by checking_ipython_canary_method_should_not_exist_
before inspecting the object.ref: ZhiyuanChen/CHANfiG#6
The text was updated successfully, but these errors were encountered: