관리-도구
편집 파일: protocol.cpython-38.pyc
U &?�fo � @ s\ d dl mZmZmZmZ d dlmZ er4d dlmZ dZ ee d�dd�Zedd �d d�Z dS ) � )�Any�cast�Set� TYPE_CHECKING)�isclass��RenderableType�-aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf)�check_object�returnc C s t | t�pt| d�pt| d�S )z+Check if an object may be rendered by Rich.�__rich__�__rich_console__)� isinstance�str�hasattr)r � r �G/opt/hc_python/lib/python3.8/site-packages/pip/_vendor/rich/protocol.py� is_renderable s ��r r )� renderabler c C sn ddl m} t� }t| d�rdt| �sdt| t�r6t| �S t| d�}|� } t| �}||krXqd|� |� qt || �S )z�Cast an object to a renderable by calling __rich__ if present. Args: renderable (object): A potentially renderable object Returns: object: The result of recursively calling __rich__. r r r )�pip._vendor.rich.consoler �setr r � _GIBBERISH�repr�getattr�type�addr )r r �rich_visited_set�cast_method�renderable_typer r r � rich_cast s r N)�typingr r r r �inspectr r r r �boolr �objectr r r r r �<module> s