Skip to content
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

[REQUEST] Add max_depth as a parameter to install() #2486

Closed
multimeric opened this issue Aug 24, 2022 · 2 comments · Fixed by #2491
Closed

[REQUEST] Add max_depth as a parameter to install() #2486

multimeric opened this issue Aug 24, 2022 · 2 comments · Fixed by #2491

Comments

@multimeric
Copy link
Contributor

How would you improve Rich?

Currently rich.pretty.install() accepts most of the parameters allowed by rich.pretty.pprint(), but it doesn't have max_depth. I would add this parameter to install().

What problem does it solve for you?

I would like to use the rich install hook, but also to customize the pretty printing behaviour, specifically the max_depth argument to simplify the result presentation. It isn't trivial to implement this in user code, because the install() function is actually quite complex, and difficult to modify.

@multimeric
Copy link
Contributor Author

Actually, is there a chance we could just forward all the kwargs from install to the Pretty constructor or _ipy_display_hook? It seems like it would be more maintainable that way.

@github-actions
Copy link

Did I solve your problem?

Why not buy the devs a coffee to say thanks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant