관리-도구
편집 파일: padding.cpython-311.pyc
� �Dgj � � � d dl mZmZmZmZmZmZ erddlmZm Z m Z mZ ddlm Z ddlmZ ddlmZ ddlmZ eeee eeef eeeeef f Z G d� d e � � Zed k rd dlmZ e edd d�� � � � dS dS )� )�cast�List�Optional�Tuple� TYPE_CHECKING�Union� )�Console�ConsoleOptions�RenderableType�RenderResult)�JupyterMixin)�Measurement)�Style)�Segmentc �� � e Zd ZdZ dddd�dddd d eeef defd�Ze ddd e dd fd�� � Zedd de e e e e f fd�� � Zdefd�Z dd�Z dd�ZdS )�Paddinga Draw space around content. Example: >>> print(Padding("Hello", (2, 4), style="on blue")) Args: renderable (RenderableType): String or other renderable. pad (Union[int, Tuple[int]]): Padding for top, right, bottom, and left borders. May be specified with 1, 2, or 4 integers (CSS style). style (Union[str, Style], optional): Style for padding characters. Defaults to "none". expand (bool, optional): Expand padding to fit available width. Defaults to True. �r r r r �noneT)�style�expand� renderabler �pad�PaddingDimensionsr r c � � || _ | � |� � \ | _ | _ | _ | _ || _ || _ d S )N)r �unpack�top�right�bottom�leftr r )�selfr r r r s �x/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/rich/padding.py�__init__zPadding.__init__! s? � � %���7;�{�{�3�7G�7G�4���$�*�d�k�4�9��� ������ �level�returnc �. � t |ddd|fd�� � S )z�Make padding instance to render an indent. Args: renderable (RenderableType): String or other renderable. level (int): Number of characters to indent. Returns: Padding: A Padding instance. r F)r r )r )�clsr r% s r"