R`i ^ d dl mZmZ ddlmZ ddlmZ erddlmZm Z m
Z
mZ G d de Zy) )Optional
TYPE_CHECKING )JupyterMixin)Measurement)ConsoleConsoleOptionsRenderableTypeRenderResultc T e Zd ZdZd
dddee ddfdZ ddZ dd Zy)
ConstrainzConstrain the width of a renderable to a given number of characters.
Args:
renderable (RenderableType): A renderable object.
width (int, optional): The maximum width (in characters) to render. Defaults to 80.
renderabler
widthreturnNc || _ || _ y N)r r )selfr r 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/constrain.py__init__zConstrain.__init__ s $
c # K | j | j y |j t | j |j }|j | j | E d { y 7 wr )r r update_widthmin max_widthrender)r consoleoptions
child_optionss r __rich_console__zConstrain.__rich_console__ sU :://!#00TZZARAR1STM~~doo}EEEs A*A4,A2-A4c | j |j | j }t j ||| j }|S r )r r r getr )r r r measurements r __rich_measure__zConstrain.__rich_measure__ s> ::!**4::6G!oogwHr )P )r r r r r r )r r r r r r ) __name__
__module____qualname____doc__r intr r r# r r r
r
se #3 HSM SW F F+;F F +; r r
N)
typingr r jupyterr measurer r r r r
r r
r* r r