
    g_                     b    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y
)    )ListOptionalTuplelinereturnc                 l    | j                  d      }|dk7  r| d| | |dz   d j                         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     0/usr/lib/python3/dist-packages/isort/comments.pyparser      sK     IIcNM^m$d=1+<+>&?&E&E&GHH":    commentsoriginal_stringremovedcomment_prefixc                     |rt        |      d   S | s|S g }| D ]  }||vs|j                  |        t        |      d    | ddj                  |       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      sw     _%a((%' 	0Go-&&w/	0 (+,^,<Adii>X=YZZr   N)r   Fr   )typingr   r   r   strr   boolr    r   r   <module>r"      ss    ( ( c3h  	[tCy![[ [ 	[
 	[r   