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]Configurable size of output from inspect() #3023

Closed
wileur opened this issue Jul 4, 2023 · 3 comments
Closed

[REQUEST]Configurable size of output from inspect() #3023

wileur opened this issue Jul 4, 2023 · 3 comments

Comments

@wileur
Copy link

wileur commented Jul 4, 2023

Consider posting in https://github.com/textualize/rich/discussions for feedback before raising a feature request.

Have you checked the issues for a similar suggestions?

Yes, didn't find anything

How would you improve Rich?

I would like to be able to increase the number of lines/items that inspect() can show. Right now it is hardcoded in
_inspect.py -> class Inspect() -> _render()

At line 170 there is a call to Pretty(obj, indent_guides=True, max_length=10, max_string=60)

I propose two steps:
-Make max_length and max_string configuration parameters for the inspect module. In this way they can be configured for a project
-Make them keyword parameters to the inspect() call. Default values can be None to use the project wide setting

What problem does it solve for you?

I work a lot with long and deep structures on several platforms. While altering the source on one development device is doable it becomes unwieldy on all the deployed devices. I could make my own version, but would prefer to stick to the official release.

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

Sorry, I don’t think there is much demand for this. You can always rich.print your object if you need to see all the data.

@github-actions
Copy link

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual

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

No branches or pull requests

2 participants