o
    Mf                     @   s   d dl mZ d dlmZmZ d dlZd dlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ 				dd
ddee dee dee dee defddZdS )    )Mapping)AnyOptionalN)JustifyMethod   )box)ReprHighlighter)Pretty)TablemappingzMapping[Any, Any]titlecaptiontitle_justifycaption_justifyreturnc           	      C   s   t dt td||tjdd}||_||_|dur||_|dur$||_	t
 }|  D ]\}}|t||dt||d q+|S )a  Generate a simple table from a mapping.

    Args:
        mapping (Mapping): A mapping object (e.g. a dict);
        title (str, optional): Optional title to be displayed over the table.
        caption (str, optional): Optional caption to be displayed below the table.
        title_justify (str, optional): Justify method for title. Defaults to None.
        caption_justify (str, optional): Justify method for caption. Defaults to None.

    Returns:
        Table: A table instance which may be rendered by the Console.
    z/tabulate_mapping will be deprecated in Rich v11Fblue)show_headerr   r   r   border_styleN)highlighter)warningswarnDeprecationWarningr
   r   ROUNDEDr   r   r   r   r   itemsadd_rowr	   )	r   r   r   r   r   tabler   keyvalue r   [/var/www/html/analyze/labelStudio/lib/python3.10/site-packages/pip/_vendor/rich/tabulate.pytabulate_mapping   s(   r    )NNNN)collections.abcr   typingr   r   r   pip._vendor.rich.consoler    r   r   r   prettyr	   r   r
   strr    r   r   r   r   <module>   s2    