Replies: 2 comments 5 replies
-
That's certainly possible. I could add an I was wondering if it would be worthwhile adding a smarter mechanism to decide which frames to emphasize and which to reduce. Like demoting stdlib frames and code in site packages, and emphasizing your own project. Or maybe it could be as simple as emphasizing the last n frames. Not sure what the best approach would be to satisfy everyone's use case. Would be great to get more feedback on this one. |
Beta Was this translation helpful? Give feedback.
-
While we're on the topic of compressing the length of the tracebacks, would it be possible to customise the number of newlines in the traceback too? When using eg. instead of this:
Be able to have this:
or even this..?
|
Beta Was this translation helpful? Give feedback.
-
I love the traceback rendering in Rich, and I love the
extra_lines
argument, which gives more context around the code causing problems. However, adding these extra lines around each entry in the traceback can make it super long - for example, I've started noticing that people can't post them in Slack because they exceed the maximum message length. The traceback length can actually make it harder to read as the log messages are now so far above it that you have to scroll for miles.Most of the time, it's only really the final entry which is of real interest to me. I would love it if I could tell Rich to have
extra_lines=3
on just that final entry in the stack but haveextra_lines=0
on everything else.Is this already possible somehow? Would it be a valid feature request for Rich?
Phil
Beta Was this translation helpful? Give feedback.
All reactions