
    ESj9                        d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ 	 	 	 	 	 	 	 	 	 	 	 	 ddZdd	Zdd
Z	 d	 	 	 	 	 	 	 	 	 ddZdddZy)    )annotations)Iterator)saferepr)_AssertionTextDiffStyle)_HighlightFunc)dummy_highlighter)assert_neverc              #     K   |xdk(  r t        | |      E d {    y xdk(  r t        | |||      E d {    y }t        |       y 7 /7 w)Nblockndiff)_diff_text_block
_diff_textr	   )leftrighthighlighterverboseassertion_text_diff_styleunreachables         o/Users/ahmed/devFolder/Ultron/claude-voice/.venv/lib/python3.12/site-packages/_pytest/assertion/compare_text.py_compare_eq_textr      sI      $'e444!${GDDD%	 5Ds   AA	AAAAc              #  x   K   d t        |       E d {    d d t        |      E d {    y 7  7 w)NzLeft: zRight:)_format_text_block_lines)r   r   s     r   r   r      s<     
M'---
H
N'... . /s   :6:8::c              #  F   K   | j                  d      D ]	  }d|   y w)N
  )split)textlines     r   r   r   $   s%     

4 4&k !s   !c              #    K   ddl m} |dk  rd}t        t        t	        |       t	        |                  D ]  }| |   ||   k7  s n |dkD  r|dz  }d| d | |d } ||d }t	        |       t	        |      k(  rFt        t	        |             D ]  }| |    ||    k7  s n |dkD  r|dz  }d| d	 | d|  } |d|  }d
}| j                         s|j                         r,t        t        |             } t        t        |            }d  |dj                  d  ||j                  |      | j                  |            D              d      j                         E d{    y7 w)zYield the explanation for the diff between text.

    Unless --verbose is used this will skip leading and trailing
    characters which are identical to keep the diff minimal.
    r   )r      *   
   z	Skipping z5 identical leading characters in diff, use -v to showNz6 identical trailing characters in diff, use -v to showTz;Strings contain only whitespace, escaping them using repr()r   c              3  >   K   | ]  }|j                  d         yw)r   N)strip).0r   s     r   	<genexpr>z_diff_text.<locals>.<genexpr>Q   s!      
T JJtTs   diff)lexer)
difflibr   rangeminlenisspacereprstrjoin
splitlines)r   r   r   r   r   ikeependss          r   r   r   )   s     {s3t9c%j12AAw%(" 3 r6GAaS UVV8D!"IEt9E
"3t9%8uaRy( & 2vRs #9 9 CaRycr
H||~CISZ KK 		 
e..x8$//(:ST
 	
  jl s    AE.AE.!CE.&E,'E.c              #  B  K   |j                  |       }|d | }||t        |       z   d  }||z   }t        ||t        |      }t	        | d       d |D ]F  }|j                  d      r|j                  d      r'|j                  d      rd|dd  z    C| H y w)	Nr"   )maxsizez is contained here:Skippingz- z+ r      )findr-   r   r   r   
startswith)	termr   r   indexheadtailcorrect_textr(   r   s	            r   _notin_textr@   Y   s     IIdOE<DD	!#$D$;LdL*;WEDdB'((;
<<??:&??4 ??4 ab/!J s   BBN)r   r0   r   r0   r   r   r   intr   r   returnIterator[str])r   r0   r   r0   rB   rC   )r   r0   rB   rC   )r   )
r   r0   r   r0   r   r   r   rA   rB   rC   )r;   r0   r   r0   r   rA   rB   rC   )
__future__r   collections.abcr   _pytest._io.safereprr   _pytest.assertion._typingr   r   _pytest.assertion.highlightr   _pytest.compatr	   r   r   r   r   r@        r   <module>rL      s    " $ ) = 4 9 '&
&&  & 	&
  7& & / HI-
--(6-AD--`rK   