HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pip/_vendor/rich/__pycache__/scope.cpython-310.pyc
o

@%Ne�@s�ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZmZer:dd	lmZd
ddd
d
d
�dddeedededeedeeddfdd�Zedkr|ddlmZe�dededd
fdd�Zedd �e�d
Sd
S)!�)�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
Cs�t�}tjddd�}|jdd�dtttfdtttffdd	�}|r+t|�	�|d
�n|�	�}	|	D] \}
}t
�|
|
�d�r?dnd
fd�}|�
|t|||||d��q1tj||ddd�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 indentaton 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�itemrcSs|\}}|�d�|��fS)z2Sort special variables first, then alphabetically.�__)�
startswith�lower)r�key�_�r �8/usr/lib/python3/dist-packages/pip/_vendor/rich/scope.py�
sort_items)sz render_scope.<locals>.sort_items)rrzscope.key.specialz	scope.key)z =zscope.equals)�highlighterrrrzscope.border)r�border_styler)rr�grid�
add_columnr�strr�bool�sorted�itemsr�assembler�add_rowr
r	�fit)
rrrrrrr#�items_tabler"r*r�value�key_textr r r!�render_scopes4"���
�r1�__main__)�print�foo�barcCs6gd�}ddgd�dgdd�}ttt�dd	d
��dS)N)r��N�TFzHello Worldz1.1�confirmFruitPurchase)�apple�orange�mangoes�pomelog+����?�	194521489)�version�method�params�idz	[i]localsF)rr)r3r1�locals)r4r5�list_of_things�dict_of_thingsr r r!�testKs
�rFg�k	��W4@g��?$	@)�collections.abcr�typingrrrrr#r�panelr	�prettyr
�tabler�textrr
�consolerr(�intr1�__name__�pip._vendor.richr3�floatrFr r r r!�<module>sH�������
�8


�