R`i d dl mZ d dlmZmZmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZmZ erdd lmZ d
ddd
d
d
dddee dededee dee ddfdZedk( r(d dlmZ e dededd
fdZ edd e y
y
) )Mapping)
TYPE_CHECKINGAnyOptionalTuple )ReprHighlighter)Panel)Pretty)Table)TextTextType)ConsoleRenderableNTF)title sort_keys
indent_guides
max_length
max_stringscopezMapping[str, Any]r r r r r returnr c t }t j dd }|j d dt t
t f dt t t
f fd}|rt | j | n| j } | D ]P \ }
}t j |
|
j d
rdndfd
}|j |t ||||| R t j ||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.
)r r F)paddingexpandright)justifyitemr c P | \ }}|j d |j fS )z2Sort special variables first, then alphabetically.__)
startswithlower)r key_s /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/scope.py
sort_itemsz render_scope.