
    yIf                     v    d dl mZmZmZ dedeeef         fdZ	 	 	 ddeee                  ded	ed
edef
dZdS )    )ListOptionalTuplelinereturnc                     |                      d          }|dk    r)| d|         | |dz   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_starts     B/var/www/piapp/venv/lib/python3.11/site-packages/isort/comments.pyparser      sX     IIcNNM^m^$d=1+<+>+>&?&E&E&G&GHH":    r   Fcommentsoriginal_stringremovedcomment_prefixc                     |rt          |          d         S | s|S g }| D ]}||vr|                    |           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comments         r   add_to_liner      s      )_%%a(( !#O , ,/))""7+++O$$Q'VVV$))O:T:TVVVr   N)r   Fr   )typingr   r   r   strr   boolr    r   r   <module>r"      s    ( ( ( ( ( ( ( ( ( ( c3h     	W WtCy!WW W 	W
 	W W W W W Wr   