o
    Ưh                     @   s`   d dl mZmZmZ dedeeef fddZ			ddeee  d	ed
ededef
ddZdS )    )ListOptionalTuplelinereturnc                 C   s:   |  d}|dkr| d| | |d d  fS | dfS )zkParses import lines for comments and returns back the
    import statement and the associated comment.
    #N    )findstrip)r   comment_start r   K/var/www/Befach/backend/venv/lib/python3.10/site-packages/isort/comments.pyparse   s   
 r   r
   Fcommentsoriginal_stringremovedcomment_prefixc                 C   sX   |rt |d S | s|S g }| D ]}||vr|| qt |d  | dd| S )z;Returns a string with comments added if removed is not set.r    z; )r   appendjoin)r   r   r   r   unique_commentscommentr   r   r   add_to_line   s   
 r   N)r
   Fr
   )typingr   r   r   strr   boolr   r   r   r   r   <module>   s     
