CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
table.cpython-310.pyc268 linesDownload Raw Back to __pycache__
1o

2��Yiq��@s,ddlmZmZmZddlmZmZmZmZm	Z	m3Z4mZmZm
Z
ddlmZmZddlmZmZddlmZddlmZmZddlmZdd	lmZdd5lmZddlm Z m!Z!ddl"m#Z#dd
l$m%Z%ddl&m'Z'm(Z(ddl)m*Z*m+Z+er�ddl,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2eGdd�d��Z3eGdd�d��Z4Gdd�de	�Z5Gdd�de�Z6e7dk�r�ddl8m-Z-ddl9m:Z:ddl;m<Z<e<d���e6ddd d!�Z=e=j>d"d#d$d%d&�e=j>d'd(d)�e=j>d*d d+d,�e=�?d-d.d/�e=�?d0d1d2�e=j?d3d4d5d6d%d7�e=�?d8d9d:�d;e@d<d=fd>d?�ZAe-�Z,e:�ZBeAd@�e,jCe=dAdB�d%e=_DeAdC�e,�Ce=�dDe=_EeAdE�e,jCe=dAdB�d=e=_EdFe=_DdGdHge=_FeAdI�e,jCe=dAdB�d=e=_EdFe=_DdGdHge=_Fde=_GeAdJ�e,jCe=dAdB�d=e=_EdFe=_DdGdHge=_Fd%e=_Hde=_GeAdK�e,jCe=dAdB�Wd=�d=S1�s�wYd=Sd=S)L�)�	dataclass�field�replace)	�
TYPE_CHECKING�Dict�Iterable�List�6NamedTuple�Optional�Sequence�Tuple�Union�)�box�errors)�loop_first_last�	loop_last)�	pick_bool)�ratio_distribute�ratio_reduce)�VerticalAlignMethod)�JupyterMixin)�Measurement)�Padding�PaddingDimensions)�
is_renderable)�Segment)�Style�	StyleType)�Text�TextType)�Console�ConsoleOptions�
JustifyMethod�OverflowMethod�RenderableType�RenderResultc@s<eZdZUdZdZded<	dZded<	dZeed<	dZ	eed<	dZ7eed<	d	Zd8ed<	dZd
ed<	dZ
ded<	dZeeed<	dZeeed<	dZeeed<	dZeeed<	dZeed<	dZeed<	dZeed<	eed�Zeded<d%dd �Zededfd!d"��Zedefd#d$��Z dS)&�Columna�9Defines a column within a ~Table.10 11    Args:12        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.13        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.14        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.15        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.16        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.17        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.18        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).19        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.20        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.21        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.22        show_header (bool, optional): Show a header row. Defaults to True.23        show_footer (bool, optional): Show a footer row. Defaults to False.24        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.25        show_lines (bool, optional): Draw lines between every row. Defaults to False.26        leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.27        style (Union[str, Style], optional): Default style for the table. Defaults to "none".28        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.29        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".30        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".31        border_style (Union[str, Style], optional): Style of the border. Defaults to None.32        title_style (Union[str, Style], optional): Style of the title. Defaults to None.33        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.34        title_justify (str, optional): Justify method for title. Defaults to "center".35        caption_justify (str, optional): Justify method for caption. Defaults to "center".36        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.37    �r%�header�footer�header_style�footer_style�style�leftr#�justify�topr�vertical�ellipsisr$�overflowN�width�	min_width�	max_width�ratioF�no_wrap�	highlightr�_index)�default_factory�_cells�returncCst|gd�S)zReturn a copy of this Column.�r<)r��self�rA��E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\pip/_vendor/rich/table.py�copyuszColumn.copyccs�|jEdHdS)z2Get all cells in the column, not including header.Nr>r?rArArB�cellsys�zColumn.cellscCs38|jduS)z!Check if this column is flexible.N)r7r?rArArB�flexible~�39zColumn.flexible)r=r')!�__name__�40__module__�__qualname__�__doc__r)�__annotations__r*r+rr,r-r/r1r3r4r41�intr5r6r7r8�boolr9r:r�listr<rrC�propertyrrDrErArArArBr'&sL4243r'c@s0eZdZUdZdZeeed<	dZe	ed<dS)�RowzInformation regarding a row.Nr-F�end_section)44rGrHrIrJr-r45rrKrQrMrArArArBrP�s46rPc@s.eZdZUdZeed<	ded<	eed<dS)�_CellzA single cell in a table.r-r%�47renderabler1N)rGrHrIrJrrKrrArArArBrR�s48rRc7@s~eZdZUdZeeed<eeed<ddddej	ddddddddddd	dd49dddddddd
�de50eefdee
dee
deedeedeejdeedededededededededededeeed eed!eed"eed#eed$eed%d&d'd&d(ed)df6d*d+�Zeddddd,�de51eefdedededed)dfd-d.��Zed)efd/d0��Zejded)dfd1d0��Zed)efd2d3��Zed)efd4d5��Zd6d7d8ed)efd9d:�Zd6d7d;d<d)efd=d>�Zed)eeeeeffd?d@��Z e jded)dfdAd@��Z 	B	BdndddddCdDdEddddddF�dGdHdIdHd eed(eed!eedeedJd&dKdLdMdNdeedeedOeedPeedQed)dfdRdS�Z!dddT�dUedHdeedVed)dfdWdX�Z"dodYdZ�Z#	6	7	;	<	)	[dpd\d]�Z$d6d7d;d<d)eefd^d_�Z%ed`eedaeedOed)eefdbdc��Z&d6d7ddedeed)ee'fdfdg�Z(dded)efdhdi�Z)d6d7d;d<deed)efdjdk�Z*d6d7d;d<d`eed)d[fdldm�Z+dS)q�TableaA console renderable to draw a table.52 53    Args:54        *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.55        title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.56        caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.57        width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.58        min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.59        box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.60        safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.61        padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).62        collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.63        pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.64        expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.65        show_header (bool, optional): Show a header row. Defaults to True.66        show_footer (bool, optional): Show a footer row. Defaults to False.67        show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.68        show_lines (bool, optional): Draw lines between every row. Defaults to False.69        leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.70        style (Union[str, Style], optional): Default style for the table. Defaults to "none".71        row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.72        header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".73        footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".74        border_style (Union[str, Style], optional): Style of the border. Defaults to None.75        title_style (Union[str, Style], optional): Style of the title. Defaults to None.76        caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.77        title_justify (str, optional): Justify method for title. Defaults to "center".78        caption_justify (str, optional): Justify method for caption. Defaults to "center".79        highlight (bool, optional): Highlight cell contents (if str). Defaults to False.80    �columns�rowsN)rrFTr�noneztable.headerztable.footer�center)�title�captionr4r5r�safe_box�padding�collapse_padding�pad_edge�expand�show_header�show_footer�	show_edge�81show_lines�leadingr-�82row_stylesr+r,�border_style�title_style�
caption_style�
title_justify�caption_justifyr9�headersrYrZr4r5rr[r\r]r^r_r`rarbrcrdr-rer+r,rfrgrhrir#rjr9r=cGs�g|_g|_||_||_||_||_||_||_t�	|�|_83|	|_|84|_||_
||_|
|_||_||_||_||_|p<d|_|pAd|_||_||_||_||_||_||_t|pYg�|_|jj}|D]}t|t �rp|j!|d�qbt"|j�|_#||�qbdS)Nr()r))$rUrVrYrZr4r5rr[r�unpack�_paddingr^�_expandr`rarbrcrdr]r-r+r,rfrgrhrirjr9rNre�append�85isinstance�str�86add_column�lenr:)r@rYrZr4r5rr[r\r]r^r_r`rarbrcrdr-rer+r,rfrgrhrirjr9rk�
append_columnr)rArArB�__init__�sD87888990�zTable.__init__)r\r]r^r_cGs||d||ddd||d��S)a�Get a table with no lines, headers, or footer.91 92        Args:93            *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.94            padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.95            collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.96            pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.97            expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.98 99        Returns:100            Table: A table instance.101        NF)rr\r]r`rarbr^r_rA)�clsr\r]r^r_rkrArArB�grid�s�z102Table.gridcCs|jp|jduS)z-Setting a non-None self.width implies expand.N)rnr4r?rArArBr_szTable.expandcCs103||_dS)zSet expand.N)rn)r@r_rArArBr_#rFcCs4d}|jr|jr|d7}|jr|t|j�d7}|S)z'Get extra width to add to cell content.r�r)rrbrsrU)r@r4rArArB�_extra_width(szTable._extra_widthcCs104t|j�S)zGet the current number of rows.)rsrVr?rArArB�	row_count2rFzTable.row_count�consoler!�indexcCsRt��}|jr||�|j|t|j��7}|j|j}|dur'||�|�7}|S)zGet the current row style.N)r�nullre�	get_stylersrVr-)r@r{r|r-�	row_stylerArArB�
get_row_style7szTable.get_row_style�optionsr"cs��j�|jdur|j��dkrtdd�S|j}t|�����|����|j�����fdd�|jD�}tdd�|D��|}|jdurOtdd�|D��|n|j}t||�}|�	|j105�}|S)Nrcsg|]}������|��qSrA)�update_width��.0�column��_measure_columnr{r6r�rArB�106<listcomp>Rs��z*Table.__rich_measure__.<locals>.<listcomp>cs��|]}|jVqdS�N)�minimum�r��measurementrArArB�	<genexpr>W��z)Table.__rich_measure__.<locals>.<genexpr>csr�r���maximumr�rArArBr�Zr�)r6r4rry�sum�_calculate_column_widthsr�r�rU�clampr5)r@r{r��extra_width�measurements�
minimum_width�
maximum_widthr�rAr�rB�__rich_measure__As0107108����109��110zTable.__rich_measure__cCs|jS)zGet cell padding.)rmr?rArArBr\bsz
Table.paddingcCst�|�|_|S)zSet cell padding.)rrlrm)r@r\rArArBr\gsr(r.r0r2)r+r9r,r-r/r1r3r4r5r6r7r8r)r%r*r/r1rr3r$r6r7r8cCsVtt|j�|||p111d|dur|n|j|pd|pd|||	|112|||
|d�}|j�|�dS)a�Add a column to the table.113 114        Args:115            header (RenderableType, optional): Text or renderable for the header.116                Defaults to "".117            footer (RenderableType, optional): Text or renderable for the footer.118                Defaults to "".119            header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None.120            highlight (bool, optional): Whether to highlight the text. The default of None uses the value of the table (self) object.121            footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None.122            style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None.123            justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".124            vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top".125            overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis".126            width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None.127            min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None.128            max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None.129            ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.130            no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.131        r(N)r:r)r*r+r9r,r-r/r1r3r4r5r6r7r8)r'rsrUr9ro)r@r)r*r+r9r,r-r/r1r3r4r5r6r7r8r�rArArBrrms$'�zTable.add_column�r-rQ�renderablesrQcGsdtddddfdd�}t|�}|j}t|�t|�kr)g|�dgt|�t|��}t|�D]H\}}|t|�krRt||jd�}	|jD]	}132||	td	��qA|j�|	�n||}	|dur`||	d	�q-t	|�rj||	|�q-t133�d134t|�j
�d���|j�t||d��dS)
a�Add a row of renderables.135 136        Args:137            *renderables (None or renderable): Each cell in a row must be a renderable object (including str),138                or ``None`` for a blank cell.139            style (StyleType, optional): An optional style to apply to the entire row. Defaults to None.140            end_section (bool, optional): End a section and draw a line. Defaults to False.141 142        Raises:143            errors.NotRenderableError: If you add something that can't be rendered.144        r�rSr%r=NcSs|j�|�dSr�)r<ro)r�rSrArArB�add_cell�szTable.add_row.<locals>.add_cell)r:r9r(zunable to render z1; a string or other renderable object is requiredr�)r'rNrUrs�	enumerater9rVrrorr�NotRenderableError�typerGrP)r@r-rQr�r��cell_renderablesrUr|rSr��_rArArB�add_row�s0��145�z
Table.add_rowcCs|jrd|jd_dSdS)z2Add a new section (draw a line after current row).T�����N)rVrQr?rArArB�add_section�s�zTable.add_sectionr&c	#s��|jstd�VdS|j}|jdur|j}|j}|��|�||��}t|�|}|j||j	dd��	ddt146dtdddd	f��fd147d�
}|jrY||jt
�|jd�|jd
�EdH|���|�EdH|jry||jt
�|jd�|jd
�EdHdSdS)N�148)r4r9�heightrX�textr-r/r#r=r&cs4t|t�r
�j||dd�n|}�j|�j|d�d�S)NF)r-r9�r/)r�)rprq�149render_str�render�update)r�r-r/�render_text�r{�render_optionsrArB�render_annotation�s���z1Table.__rich_console__.<locals>.render_annotationztable.title)r-r/z
table.caption)rX)rUrr6r4ryr�r�r�r�r9r rrYr�150pick_firstrgri�_renderrZrhrj)r@r{r�r6r��widths�table_widthr�rAr�rB�__rich_console__�sN�151152����������zTable.__rich_console__cs��j}�j}���fdd�|D�}dd�|D�}�j��j}�jredd�|D�}t|�redd�t||�D�}	�fdd�|D�}153|t|	�}t|||154�}t	|�}
t155|�D]\}}|jrd|	|t|
�||<qSt|�}||kr���
|dd�|D�|�}t|�}||kr�||}t|dgt|�||�}t|�}���fd	d�t||�D�}d156d�|D�}||kr��js��jdur�|�j|kr݈jdur�|nt�j||�}t|||�}dd�t||�D�}|S)
zNCalculate the widths of each column, including padding, not including borders.csg|]	}����|��qSrA)r�r��r{r�r@rArBr�s�z2Table._calculate_column_widths.<locals>.<listcomp>cS�g|]}|jpd�qS�rr��r��_rangerArArBr��cSsg|]157}|jr|jpd�qS�r)rEr7)r��colrArArBr�scSs g|]\}}|jrdn|j�qSr�)rEr�)r�r�r�rArArBr�s��cs&g|]}|jr|jpd�|j��qSr�)rEr4r:r�)�get_padding_widthrArBr�s��cSsg|]}|jduo|j�qSr�)r4r8r�rArArBr�.srcs$g|]\}}�����|�|��qSrA)r�r�)r�r4r�r�rArBr�8���cSr�r�r�r�rArArBr�<r�NcSsg|]\}}||�qSrArA)r��_width�padrArArBr�Gs)r6rU�_get_padding_widthryr_�any�zipr�r�iterr�rE�next�_collapse_widthsrrsr5�min)r@r{r�r6rU�width_rangesr�r��ratios�fixed_widths�flex_minimum�flexible_width�flex_widths�iter_flex_widthsr|r�r��excess_width�158_max_width�159pad_widthsrA)r{r�r�r@rBr�sb��160����161��zTable._calculate_column_widthsr��wrapablec162s�t|�}||}t|�rd|rd|dkrdtdd�t||�D���t�fdd�t||�D��}�|}�fdd�t||�D�}t|�rB|sE	|St||�gt|�}	t|||	|�}t|�}||}|rd|dks|S)aMReduce widths so that the total is under max_width.163 164        Args:165            widths (List[int]): List of widths.166            wrapable (List[bool]): List of booleans that indicate if a column may shrink.167            max_width (int): Maximum width to reduce to.168 169        Returns:170            List[int]: A new list of widths.171        rcss�|]	\}}|r|VqdSr�rA�r�r4�172allow_wraprArArBr�]s��173�z)Table._collapse_widths.<locals>.<genexpr>c3s(�|]\}}|r|�kr|ndVqdS)rNrAr���174max_columnrArBr�`s175��176�cs$g|]\}}|�kr|rdnd�qS)rrrAr�r�rArBr�er�z*Table._collapse_widths.<locals>.<listcomp>)r�r��maxr�r�rsr)177rvr�r�r6�total_widthr��second_max_column�column_differencer��178max_reducerAr�rBr�Ks.��179���zTable._collapse_widths�column_indexr�c180#sr�|j�|j�|j�t��}|dk�|t|j�dk�i�dtdtdtttttff������fdd�}g}|j	}|j181}|jrS||jpEd�||j�}	||	|j
f�||jpXd�}182|jD]}||183|f�q]|jr|||jpnd�||j�}|||jf�|r�t}
t|�D]\}}\}}t||
||||��t|d	d184�p�|j�Vq�d185S|D]\}}t||t|d	d186�p�|j�Vq�d187S)z3Get all the cells with padding and optional header.rr�	first_row�last_rowr=cs���||f�}|r|S�\}}}}�r%�std||�}|s%td||�}�s7�r+d}�r/d}|r3d}|r7d}||||f}|�||f<|S)Nr)�getr�)r�r��cachedr0�right�bottomr.rm��_padding_cacher]�first_column�last_columnr^r\rArB�get_padding�s*z%Table._get_cells.<locals>.get_paddingr(r1N)r]r^r\r�rsrUrMrrLror~r`r+r)r-rDrar,r*rrrR�getattrr1)r@r{r�r��any_paddingr��	raw_cells�_appendr~r+�188cell_style�cellr,�_Padding�first�lastr-rSrAr�rB�189_get_cellsrsR�0�190�����zTable._get_cellscCs2|j\}}}}|jr|dkrtd||�}||S)zGet extra width from padding.r)r\r]r�)r@r�r��	pad_right�pad_leftrArArBr��s191zTable._get_padding_widthcCs|j}|dkrtdd�S|�|j�}|jdur%t|j||j|��|�Sg}g}|j}|j}	tj}192|�||j|�D]}|193|||j	�\}}
||�|	|
�q:t|rUt194|�nd|r\t195|�n|��|�}|�|jdurkdn|j||jduryd�}|S|j|�}|S)z0Get the minimum and maximum width of the column.rrN)
r6rr�r:r4�with_maximumror�r�rSr�r�r5)r@r{r�r�r6�
padding_width�196min_widths�197max_widths�198append_min�199append_max�get_render_widthr��_min�_maxr�rArArBr��sB200201��202�����zTable._measure_columnc%
#s�����	jpd�}|���	jpd�}��	fdd�t�	j�D�}tt|��}�	jr6�	jj|t	�	j203�j204�d�nd}|rA�	jsA|��n|}t
��}	�	j}205�	j}�	j}�	j}
�	j}�	j}t
�|r��|j|��|j|��|j|�f�|j|��|j|��|j|�f�|j|��|j|��|j|�fg}|
r��|�|�|�V|	Vng}�	j}�j�tt|��D�]�\}\}}}|o�|�|o�|��sLjsLj	j||nd}d�g}�sшr�t �!��n
�|�|r�|dn|���t|||206�D].\}}}|j"||j#|j$|j%d|j&d�}�j'|j(|�|j��d�}t)�t*|���|�+|�q�t)dd�|D���d	t,t,t
d207ddt-d
t dt,t,t
f208����fdd�������fdd�t||||209�D�|dd�<|�r�|�rk|�rk�|j.|d|
d�|�V|	V||�rqdn|�rvdnd\}}}|j/�0��r�|n	�|j/�j1|j�} t2��D])}!|
�r�|Vt3|�D]\}"}#|#|!EdH|"�s�| V�q�|
�r�|V|	V�q�nt2��D]}!|D]210}#|#|!EdH�q�|	V�q�|�r�|�r�|�r�|j.|d|
d�|�V|	V|�o�|j4}$|�r5|�s�|�s�|$�r5|�s5|�r|t*|�dk�s5|�r��s5|�r&�|j.|d|
d�||�Vn�|j.|d|
d�|�V|	Vq�|�rJ|
�rL�|�5|�|�V|	VdSdSdS)Nr(c3s"�|]\}}���||�VqdSr�)r�)r�r�r�)r{r@rArBr��s211��212�z Table._render.<locals>.<genexpr>)�safer)r4r/r8r3r�r9�r-css�|]}t|�VqdSr�)rs)r�r�rArArBr�Es�r�r1rr4r-r=csR�rd}n�r	d}|dkr��||�|�S|dkr!��||�|�S��||�|�S)Nr�r0�middle)�	align_top�align_middle�align_bottom)r�r1r4r-)�_Segment�213footer_row�214header_row�215row_heightrArB�216align_cellGsz!Table._render.<locals>.align_cellc217s8g|]\}}}}���||j|�|j���|���qSrA)�	set_shaper1r-)r�r4�_cellr�r�)rrr~�218max_heightrrArBr�Xs219����z!Table._render.<locals>.<listcomp>�foot)�edgerrx�head�mid�row)6r~r-rfr�rUrNr�r�220substituterr[r`�get_plain_headed_boxr�linerarbrcrd�	head_left�221head_right�
head_vertical�mid_left�	mid_right�mid_vertical�	foot_left�222foot_right�
foot_vertical�get_topr�rrVrr}r�r/r8r3r9�render_linesrSr�rsrorrL�get_rowr��strip�background_style�rangerrQ�223get_bottom)%r@r{r�r��table_stylerf�
_column_cells�	row_cells�_box�new_linerUr`rarbrcrd�box_segmentsr�r|r�r��row_cellrrDr4r�r�r��linesr.r��_divider�divider�line_no�	last_cell�
rendered_cellrQrA)224rrr{rr~rr225rrr@rBr��s*�����226227228�229230231�232233234������235���236����237���"����238�239��������240�z
Table._render)r(r()r=N)r{r!r�r"r=r&),rGrHrIrJrr'rKrPr�241HEAVY_HEADr
rqr242r rL�BoxrMrrrru�classmethodrwrOr_�setterryrzr�rr�rr\rrr�r�r�r�r�rRr�r�r�r�rArArArBrT�s�243�244�������	�245���
������246���������247�@�248������ 	249��250�!��������	�251���
����252�=����253254/��255�/��256�@����&���257�I���258�(����rT�__main__)r!)�ReprHighlighter)�timerzTable renderzStar Wars MovieszRich example tabler�)rYrZrjZReleased�bright_cyan�cyanT)r+r-r8ZTitle�magentar�z259Box Office�green)r/r-zDec 20, 2019z Star Wars: The Rise of Skywalkerz$952,110,690zMay 25, 2018zSolo: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. V111: The Last Jediz$1,332,539,889zon blackr�zDec 16, 2016zRogue One: A Star Wars Storyz$1,332,439,889r�r=NcCs"t��t�t|��t��dSr�)r{�print�ruler9)r�rArArBr)�sr)z
Example TablerXr�zexpand=True�2zwidth=50F�dimrWzrow_styles=['dim', 'none']z%leading=1, row_styles=['dim', 'none']z+show_lines=True, row_styles=['dim', 'none'])I�dataclassesrrr�typingrrrrr	r260rrr
r(rr�_looprr�_pickr�_ratiorr�alignr�jupyterr�measurerr\rr�protocolr�segmentrr-rrr�rr r{r!r"r#r$r%r&r'rPrRrTrG�pip._vendor.rich.consoleZpip._vendor.rich.highlighterr5Z_timerr6�tablerrr�rqr)r9r;r_r4rerdrcrArArArB�<module>s�, 261]262263
264�����265266267268$��
Aluode/PerceptionLabPortable · CoolFace