U
ʗRe @ s d dl mZ d dlmZmZmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZmZ ertdd lmZ d
ddd
d
d
dee eeee ee ddddZedkrd dlmZ e eed
dddZedd e d
S ) )Mapping)
TYPE_CHECKINGAnyOptionalTuple )ReprHighlighter)Panel)Pretty)Table)TextTextType)ConsoleRenderableNTF)title sort_keys
indent_guides
max_length
max_stringzMapping[str, Any]r )scoper r r r r returnc
C s t }tjddd}|jdd tttf tttf ddd}|rTt| |d n| } | D ]@\}
}t
|
|
d
r|dndfd
}|
|t|||||d q`tj||dddS )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.
)r r F)paddingexpandright)justify)itemr c S s | \}}| d | fS )z2Sort special variables first, then alphabetically.__)
startswithlower)r key_ r /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/rich/scope.py
sort_items) s z render_scope.