Textualize / rich

Rich is a Python library for rich text and beautiful formatting in the terminal.
https://rich.readthedocs.io/en/latest/
MIT License
48.13k stars 1.69k forks source link

Add the ability to disable the display of object attributes, or to only display selected attributes in the inspect function. #3294

Closed mateusz-wozny closed 4 days ago

mateusz-wozny commented 4 months ago

Type of changes

Checklist

Description

I want to use inspect method for object which have some attributes very large (for example list of 1000 items) and currently all attributes are displayed. The output is quite unreadable so I want to disable displaying object attributes or display only selected. I added parameter to enable/disable displaying object attributes and parameter to pass names of attributes I want to display (if not specified all attributes will be displayed).

willmcgugan commented 4 days ago

What has that many attributes?

willmcgugan commented 4 days ago

Closing, because I doubt this is a concern for anyone else. Willing to be convinced.