관리-도구
편집 파일: align.cpython-312.pyc
� G��e�( � �N � d dl Z d dlmZ d dlmZmZmZ e j dk\ rd dlmZ nd dl mZ ddl mZ ddlm Z dd lmZ dd lmZ ddlmZ erddlmZmZmZmZ ed Zed Z G d� de � Z G d� de � Zedk( r�d dlmZmZ d dl m!Z! d dl"m#Z# e!� Z$ e� Z e# eejK e$d� � ejM e$d� � ejO e$d� � � ddd�� Z(ejS ejM e(ddejT �� � yy) � N)�chain)� TYPE_CHECKING�Iterable�Optional)� � )�Literal� )� Constrain)�JupyterMixin)�Measurement)�Segment)� StyleType)�Console�ConsoleOptions�RenderableType�RenderResult��left�center�right��top�middle�bottomc � � e Zd ZdZ dddddd�dddedee d ee d edee dee d dfd�Z d efd�Ze dddddd�dddee d ee d edee dee d d fd�� Ze dddddd�dddee d ee d edee dee d d fd�� Ze dddddd�dddee d ee d edee dee d d fd�� Z dd�Zddddd efd�Zy)�Aligna Align a renderable by adding spaces if necessary. Args: renderable (RenderableType): A console renderable. align (AlignMethod): One of "left", "center", or "right"" style (StyleType, optional): An optional style to apply to the background. vertical (Optional[VerticalAlginMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None. pad (bool, optional): Pad the right with spaces. Defaults to True. width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None. height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None. Raises: ValueError: if ``align`` is not one of the expected values. NT)�vertical�pad�width�height� renderabler �align�styler r r r! �returnc � � |dvrt d|�d�� �|�|dvrt d|�d�� �|| _ || _ || _ || _ || _ || _ || _ y )Nr zDinvalid value for align, expected "left", "center", or "right" (not �)r zGinvalid value for vertical, expected "top", "middle", or "bottom" (not )� ValueErrorr"