Ë
    ¾lÔh]  ã            
       óÈ  — d Z ddlZddlZddlZddlmZmZ ddlmZm	Z	 ddl
mZ  ed¬«      ddee   d	ed
eddfd„«       Z ed¬«      ddee   d	ed
eddfd„«       Z ed¬«      ddee   d	ed
eddfd„«       Zddee   d	ed
eddfd„Zdededededef
d„Z ej&                  d«      Zdedee   fd„Zdededededef
d„Zdedefd„Z ed¬«      ddœdededefd„«       Zy) zMNice output for Black.

The double calls are for patching purposes in tests.
é    N)ÚAnyÚOptional)ÚechoÚstyle)Ú
mypyc_attrT)Ú	patchableÚmessageÚnlÚstylesÚreturnc                 óN   — | �d|vrd|d<   t        | fi |¤Ž} t        | |d¬«       y )NÚboldT©r
   Úerr©r   r   ©r	   r
   r   s      úa/home/josh/.local/share/pipx/venvs/python-lsp-server/lib/python3.12/site-packages/black/output.pyÚ_outr      s4   € àÐØ˜ÑØ!ˆF�6‰NÜ˜Ñ* 6Ñ*ˆÜˆ�R˜TÖ"ó    c                 óN   — | �d|vrd|d<   t        | fi |¤Ž} t        | |d¬«       y )NÚfgÚredTr   r   r   s      r   Ú_errr      s4   € àÐØ�vÑØ ˆF�4‰LÜ˜Ñ* 6Ñ*ˆÜˆ�R˜TÖ"r   c                 ó    — t        | fd|i|¤Ž y ©Nr
   )r   r   s      r   Úoutr   !   s   € äˆÑ"�RÐ"˜6Ó"r   c                 ó    — t        | fd|i|¤Ž y r   )r   r   s      r   r   r   &   s   € ÜˆÑ"�RÐ"˜6Ó"r   ÚaÚbÚa_nameÚb_namec                 ól  — t        j                  | «      }t        j                  |«      }t        |d   «      D ��cg c][  \  }}|d   dk(  rNt        dj	                  |d   |   d   «      dz   dj	                  |d   |   d   «      dz   |› d|› �|› d|› �«      ‘Œ] }}}dj	                  |«      S c c}}w )zHReturn a unified diff string between each cell in notebooks `a` and `b`.ÚcellsÚ	cell_typeÚcodeÚ Úsourceú
z:cell_)ÚjsonÚloadsÚ	enumerateÚdiffÚjoin)	r   r   r    r!   Úa_nbÚb_nbÚcell_numberÚcellÚ
diff_liness	            r   Ú
ipynb_diffr3   *   sÌ   € ä�:‰:�a‹=€DÜ�:‰:�a‹=€Dô "+¨4°©=Ó!9÷	ñ ˆK˜Ø�Ñ Ò&ô 	Ø�G‰G�D˜‘M +Ñ.¨xÑ8Ó9¸DÑ@Ø�G‰G�D˜‘M +Ñ.¨xÑ8Ó9¸DÑ@Øˆh�f˜[˜MÐ*Øˆh�f˜[˜MÐ*õ		
ð	€Jñ 	ð �7‰7�:ÓÐùó	s   ¼A B0z(.*?(?:\r\n|\n|\r|$))r'   c                 óŒ   — t         j                  | «      D �cg c]  }|d   ‘Œ	 }}|d   dk(  r|j                  d«       |S c c}w )zÈSplit a string into lines ignoring form feed and other chars.

    This mimics how the Python parser splits source code.

    A simplified version of the function with the same name in Lib/ast.py
    r   éÿÿÿÿr&   )Ú_line_patternÚfinditerÚpop)r'   ÚmatchÚresults      r   Ú_splitlines_no_ffr;   >   sH   € ô %2×$:Ñ$:¸6Ó$BÖC˜5ˆe�A‹hÐC€FÐCØˆb�z�RÒØ�
‰
�2ŒØ€Mùò Ds   ˜Ac                 ó  — ddl }t        | «      }t        |«      }g }|j                  ||||d¬«      D ]A  }|d   dk(  r|j                  |«       Œ|j                  |dz   «       |j                  d«       ŒC dj	                  |«      S )	z9Return a unified diff string between strings `a` and `b`.r   Né   )ÚfromfileÚtofileÚnr5   r(   z\ No newline at end of file
r&   )Údifflibr;   Úunified_diffÚappendr-   )	r   r   r    r!   rA   Úa_linesÚb_linesr2   Úlines	            r   r,   r,   K   s˜   € ãä Ó"€GÜ Ó"€GØ€JØ×$Ñ$Ø� 6°&¸Að %ó ò 
@ˆð �‰8�tÒØ×Ñ˜dÕ#à×Ñ˜d T™kÔ*Ø×ÑÐ>Õ?ð
@ð �7‰7�:ÓÐr   Úcontentsc                 óf  — | j                  d«      }t        |«      D ]‚  \  }}|j                  d«      s|j                  d«      r	d|z   dz   }nM|j                  d«      r	d|z   dz   }n3|j                  d«      r	d	|z   dz   }n|j                  d
«      rd|z   dz   }|||<   Œ„ dj                  |«      S )z(Inject the ANSI color codes to the diff.r(   z+++z---z[1mz[0mz@@z[36mú+z[32mú-z[31m)Úsplitr+   Ú
startswithr-   )rG   ÚlinesÚirF   s       r   Ú
color_diffrO   `   s¹   € à�N‰N˜4Ó €EÜ˜UÓ#ò 	‰ˆˆ4Ø�?‰?˜5Ô! T§_¡_°UÔ%;Ø˜tÑ# iÑ/‰DØ�_‰_˜TÔ"Ø Ñ$ yÑ0‰DØ�_‰_˜SÔ!Ø Ñ$ yÑ0‰DØ�_‰_˜SÔ!Ø Ñ$ yÑ0ˆDØˆˆaŠð	ð �9‰9�UÓÐr   )Úensure_final_newlineÚoutputrP   c                 ó   — t        j                  ddddd¬«      5 }|D ]3  }|j                  |«       | sŒ|sŒ|d   dk7  sŒ#|j                  d«       Œ5 	 d	d	d	«       |j                  S # 1 sw Y   j                  S xY w)
z;Dump `output` to a temporary file. Return path to the file.ÚwÚblk_z.logFÚutf8)ÚmodeÚprefixÚsuffixÚdeleteÚencodingr5   r(   N)ÚtempfileÚNamedTemporaryFileÚwriteÚname)rP   rQ   ÚfrM   s       r   Údump_to_filer`   p   s{   € ô 
×	$Ñ	$Ø˜¨°uÀvô
ð à	
Øò 	ˆEØ�G‰G�EŒNÚ#ª°%¸±)¸tÓ2CØ—‘˜•ñ	÷ð �6‰6€M÷ð �6‰6€Mús   ›A)µA)¸A)ÁA)Á)A=)NT)Ú__doc__r)   Úrer[   Útypingr   r   Úclickr   r   Úmypy_extensionsr   ÚstrÚboolr   r   r   r   r3   Úcompiler6   Úlistr;   r,   rO   r`   © r   r   ú<module>rk      s¬  ðñó
 Û 	Û ß  ç Ý &ñ �dÔñ#�(˜3‘-ð #¨Dð #À3ð #È4ò #ó ð#ñ �dÔñ#�(˜3‘-ð #¨Dð #À3ð #È4ò #ó ð#ñ �dÔñ#�˜#‘ð #¨4ð #À#ð #È$ò #ó ð#ñ#�˜#‘ð #¨4ð #À#ð #È$ó #ð�#ð ˜#ð  sð °Cð ¸Có ð" �—
‘
Ð3Ó4€ð
˜cð 
 d¨3¡ió 
ðˆCð �Cð  ð ¨cð °có ð*˜ð  ó ñ  �dÔØ<@ò 	˜#ð 	°Tð 	ÀSò 	ó ñ	r   