Printing diffs
#1610
Replies: 1 comment 1 reply
-
Can't think of any shortcuts. Would you want it to be recursive? Might be complicated. Have a look at the Pretty class, which may be a good place to start. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hi, I'm processing some logs and want to highlight changes to state (tracked by e.g. a dictionary) but can't find a way to do so. What I was thinking of doing:
When state changes from
{'removed': 'value', 'kept': 'something'}
to{'kept': 'completely different', 'added': 'new'}
I'd like to display the following, but still have it behave as a dictionary (or set, or something) when pretty printing:It is trivial to generate the appropriate data, but I have no idea how to pass it to rich for printing (neither
__rich__()
nor__rich_console__()
seem to give me the right interface).Beta Was this translation helpful? Give feedback.
All reactions