관리-도구
편집 파일: padding.cpython-38.pyc
U &?�fj � @ s� d dl mZmZmZmZmZmZ er<ddlmZm Z m Z mZ ddlm Z ddlmZ ddlmZ ddlmZ eeee eeef eeeeef f ZG dd � d e �Zed kr�d dlmZ eedd dd�� dS )� )�cast�List�Optional�Tuple� TYPE_CHECKING�Union� )�Console�ConsoleOptions�RenderableType�RenderResult)�JupyterMixin)�Measurement)�Style)�Segmentc @ s� e Zd ZdZdddd�ddeeef ed�d d �Ze de d d�dd ��Zede e e e e f d�dd��Zed�dd�Zdddd�dd�Zdddd�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�expandr �PaddingDimensions)� renderable�padr r c C s0 || _ | �|�\| _| _| _| _|| _|| _d S )N)r �unpack�top�right�bottom�leftr r )�selfr r r r � r �F/opt/hc_python/lib/python3.8/site-packages/pip/_vendor/rich/padding.py�__init__! s zPadding.__init__)r �level�returnc C s t |ddd|fdd�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"