%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/rich/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/rich/__pycache__/scope.cpython-312.pyc

�

"T�e���ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZmZerdd	lmZd
ddd
d
d
�dddeedededeedeeddfd�Zedk(r(ddlmZe�dededd
fd�Zedd�e�y
y
)�)�Mapping)�
TYPE_CHECKING�Any�Optional�Tuple�)�ReprHighlighter)�Panel)�Pretty)�Table)�Text�TextType)�ConsoleRenderableNTF)�title�	sort_keys�
indent_guides�
max_length�
max_string�scopezMapping[str, Any]rrrrr�returnrc���t�}tjdd��}|jd��dtt
tfdttt
ffd�}|rt|j�|�	�n|j�}	|	D]P\}
}tj|
|
jd
�rdndfd
�}|j|t|||||����Rtj ||dd��S)a�Render python variables in a given scope.

    Args:
        scope (Mapping): A mapping containing variable names and values.
        title (str, optional): Optional title. Defaults to None.
        sort_keys (bool, optional): Enable sorting of items. Defaults to True.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.

    Returns:
        ConsoleRenderable: A renderable object.
    )rrF)�padding�expand�right)�justify�itemrc�P�|\}}|jd�|j�fS)z2Sort special variables first, then alphabetically.�__)�
startswith�lower)r�key�_s   �,/usr/lib/python3/dist-packages/rich/scope.py�
sort_itemsz render_scope.<locals>.sort_items)s(�����Q��N�N�4�(�(�#�)�)�+�6�6�)r!rzscope.key.specialz	scope.key)z =zscope.equals)�highlighterrrrzscope.border)r�border_styler)r	r�grid�
add_columnr�strr�bool�sorted�itemsr
�assembler�add_rowrr
�fit)
rrrrrrr&�items_tabler$r-r!�value�key_texts
             r#�render_scoper4s���."�#�K��*�*�V�E�:�K����7��+�7��s�C�x��7�U�4��9�-=�7�
6?�F�5�;�;�=�j�1�E�K�K�M�E��
�
��U��=�=�
�����)=�%�;�O�"�
��	������'�+�%�%�
�		
�
��9�9���#��	�r%�__main__)�print�foo�barc�`�gd�}ddgd�dgdd�}ttt�dd	�
��y)N)r��N�TFzHello Worldz1.1�confirmFruitPurchase)�apple�orange�mangoes�pomelog+����?�	194521489)�version�method�params�idz	[i]localsF)rr)r6r4�locals)r7r8�list_of_things�dict_of_thingss    r#�testrJKs4��G���,�?��G��	
��	�l�6�8�;�%�H�Ir%g�k	��W4@g��?$	@)�collections.abcr�typingrrrrr&r	�panelr
�prettyr�tabler�textr
r�consolerr+�intr4�__name__�richr6�floatrJ�r%r#�<module>rWs���#�6�6�(���� ��*�!%��� $� $�5��5��H��5��	5�
�5���
�
5���
�5��5�p�z���	�G�J�%�J�e�J��J�	��&��	�G�!r%

Zerion Mini Shell 1.0