o
    PDi`                     @  sH   d dl mZ d dlmZ d dlmZ d dlmZm	Z	 G dd deZ
dS )    )annotationsN)RichHelpFormatter)
rich_strip	rich_wrapc                   @  s$   e Zd ZdZddd	ZdddZdS )ParagraphRichHelpFormatterz?Rich help message formatter which retains paragraph separation.textr.Textwidthintreturnr.Linesc                 C  sb   t |}t }|dD ]}| |}t| j||}|| |t	d q|r/|
  |S )Nz


)r   rLinessplit_rich_whitespace_subr   consoleextendappendTextpop)selfr   r	   lines	paragraphparagraph_lines r   O/var/www/Datamplify/venv/lib/python3.10/site-packages/rich_argparse/_contrib.py_rich_split_lines   s   

z,ParagraphRichHelpFormatter._rich_split_linesindentc                   s.   |  ||}td fdd|D d S )Nr   c                 3  s    | ]} | V  qd S )Nr   ).0liner   r   r   	<genexpr>!   s    z=ParagraphRichHelpFormatter._rich_fill_text.<locals>.<genexpr>)r   r   r   join)r   r   r	   r   r   r   r!   r   _rich_fill_text   s   "z*ParagraphRichHelpFormatter._rich_fill_textN)r   r   r	   r
   r   r   )r   r   r	   r
   r   r   r   r   )__name__
__module____qualname____doc__r   r$   r   r   r   r   r      s    
r   )
__future__r   rich_argparse._lazy_rich
_lazy_richr   rich_argparse._argparser   rich_argparse._commonr   r   r   r   r   r   r   <module>   s
   