§
    öyIfø·  ã                   ó  — d Z ddlZddlmZ ddlZddlZddlZddlZddl	Zddl
Z
ddlZddlZddlZddlmZ ddlmZ ddlZddlZddlZddl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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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l0m1Z1 ddl2m3Z4 e rddl'm5Z5  G d„ d¦  «        Z6 e1d         ¦   «         Z7ej8        j9        › d e&› �Z:d!d#pd$z   Z;d%e:z   e;z   Z< e6¦   «         Z= G d&„ d'ej>        j?        ej>        j@        ¦  «        ZAd(eeB         d)ejC        d*ejD        d+dfd,„ZEd-dd*ejD        d)ejC        d.ed+eFf
d/„ZGd0ed1e*d+eejC        ejD        f         fd2„ZHd3„ fd4ed.ed5eeIgdf         d+eejD                 fd6„ZJ	 	 dsd7ejK        d4eBd8eeI         d1ee*         d+df
d9„ZLd:eMd+eIfd;„ZNd1ee*         d+eeO         fd<„ZPd:eMd+eIfd=„ZQd:eMd+eFfd>„ZRd?eeI         d@eFd+eIfdA„ZSdBeeI         dCeeF         dDeeI         dEeeM         d+eIf
dF„ZTdGeOdHeIdIeId+dfdJ„ZUd+eFfdK„ZVejW        dLejX        dMejY        dNejZ        dOiZ[i ej\        dP“ej]        dQ“ej^        dR“ej_        dS“ej`        dT“eja        dU“ejb        dV“ejc        dW“ejd        dX“eje        dY“ejf        dZ“ejg        d[“ejh        d\“eji        d]“ejj        d^“ejk        d_“ejl        d`“ejm        daejn        dbejo        dcejp        ddejq        deejr        dfi¥Zsdgejt        d+eejt                 fdh„Zu ejv        di¬j¦  «        dkeBd+eeOeIf         fdl„¦   «         Zw G dm„ dnejx        ¦  «        Zydoed+eFfdp„Zzdqed+efdr„Z{dS )tz5Rewrite assertion AST to produce nice error messages.é    N)Údefaultdict)ÚPath)ÚPurePath)ÚCallable)ÚDict)ÚIO)ÚIterable)ÚIterator)ÚList)ÚOptional)ÚSequence)ÚSet)ÚTuple)ÚTYPE_CHECKING)ÚUnion)ÚDEFAULT_REPR_MAX_SIZE)Úsaferepr)Úversion)Úutil)ÚConfig)ÚSession)Úabsolutepath)Ú
fnmatch_ex)ÚStashKey)Úformat_explanation)ÚAssertionStatec                   ó   — e Zd ZdS )ÚSentinelN)Ú__name__Ú
__module__Ú__qualname__© ó    úM/var/www/piapp/venv/lib/python3.11/site-packages/_pytest/assertion/rewrite.pyr   r   4   s   € € € € € Ø€Dr#   r   r   z-pytest-ú.pyTÚcÚoú.c            
       ó
  — e Zd ZdZdeddfd„Zdee         ddfd„Ze	j
        j        j        Z	 	 d ded	eeeeef                           d
eej                 dee	j
        j                 fd„Zde	j
        j        deej                 fd„Zdej        ddfd„Zdedddefd„Zdededddefd„Zdedddefd„Zdeddfd„Zdeddfd„Zdeeef         defd„Zej        dk    r"ej        dk    rddl m!Z! nddl"m!Z! dede!fd„Z#dS dS )!ÚAssertionRewritingHookz1PEP302/PEP451 import hook which rewrites asserts.ÚconfigÚreturnNc                 óú   — || _         	 |                     d¦  «        | _        n# t          $ r ddg| _        Y nw xY wd | _        i | _        t          ¦   «         | _        d| _        dh| _	        i | _
        d| _        d S )NÚpython_filesz	test_*.pyz	*_test.pyFÚconftest)r+   ÚgetiniÚfnpatsÚ
ValueErrorÚsessionÚ_rewritten_namesÚsetÚ_must_rewriteÚ_writing_pycÚ_basenames_to_check_rewriteÚ_marked_for_rewrite_cacheÚ_session_paths_checked)Úselfr+   s     r$   Ú__init__zAssertionRewritingHook.__init__F   s“   € ØˆŒð	5Ø Ÿ-š-¨Ñ7Ô7ˆDŒKˆKøÝð 	5ð 	5ð 	5Ø&¨Ð4ˆDŒKˆKˆKð	5øøøà*.ˆŒØ13ˆÔÝ'*¡u¤uˆÔð "ˆÔØ,6¨<ˆÔ(Ø:<ˆÔ&Ø&+ˆÔ#Ð#Ð#s   ‰$ ¤:¹:r3   c                 ó"   — || _         d| _        d S )NF)r3   r:   )r;   r3   s     r$   Úset_sessionz"AssertionRewritingHook.set_sessionV   s   € ØˆŒØ&+ˆÔ#Ð#Ð#r#   ÚnameÚpathÚtargetc                 ó  — | j         rd S | j        j        t                   }|                      ||¦  «        rd S |                     d|z  ¦  «         |                      ||¦  «        }|�O|j        �Ht          |j	        t          j        j        ¦  «        r$t          j                             |j        ¦  «        sd S |j        }|                      |||¦  «        sd S t          j                             ||| |j        ¬¦  «        S )Nzfind_module called for: %s)ÚloaderÚsubmodule_search_locations)r7   r+   ÚstashÚassertstate_keyÚ_early_rewrite_bailoutÚtraceÚ
_find_specÚoriginÚ
isinstancerC   Ú	importlibÚ	machineryÚSourceFileLoaderÚosr@   ÚexistsÚ_should_rewriter   Úspec_from_file_locationrD   )r;   r?   r@   rA   ÚstateÚspecÚfns          r$   Ú	find_specz AssertionRewritingHook.find_spec]   s  € ð Ôð 	Ø�4Ø”Ô!¥/Ô2ˆØ×&Ò& t¨UÑ3Ô3ð 	Ø�4Ø�ŠÐ0°4Ñ7Ñ8Ô8Ð8ð �Š˜t TÑ*Ô*ˆð ˆLð Œ{Ð"å˜dœk­9Ô+>Ô+OÑPÔPð #õ ”7—>’> $¤+Ñ.Ô.ð	 #ð �4à”ˆBà×#Ò# D¨"¨eÑ4Ô4ð 	Ø�4åŒ~×5Ò5ØØØØ'+Ô'Fð	 6ñ 
ô 
ð 	
r#   rT   c                 ó   — d S ©Nr"   )r;   rT   s     r$   Úcreate_modulez$AssertionRewritingHook.create_module…   s	   € ð ˆtr#   Úmodulec                 óÈ  — |j         €J ‚|j         j        €J ‚t          |j         j        ¦  «        }| j        j        t
                   }|| j        |j        <   t          j	         }t          |¦  «        }|r+t          |¦  «        }|sd}|                     d|› �¦  «         |j        d d…         t          z   }||z  }t          |||j        ¦  «        }	|	€a|                     d|›�¦  «         t!          || j        ¦  «        \  }
}	|r.d| _        	 t%          ||	|
|¦  «         d| _        n%# d| _        w xY wn|                     d|› �¦  «         t'          |	|j        ¦  «         d S )NFzread only directory: éýÿÿÿz
rewriting Tzfound cached rewritten pyc for )Ú__spec__rJ   r   r+   rE   rF   r4   r   ÚsysÚdont_write_bytecodeÚget_cache_dirÚtry_makedirsrH   r?   ÚPYC_TAILÚ	_read_pycÚ_rewrite_testr7   Ú
_write_pycÚexecÚ__dict__)r;   rZ   rU   rS   ÚwriteÚ	cache_dirÚokÚ
cache_nameÚpycÚcoÚsource_stats              r$   Úexec_modulez"AssertionRewritingHook.exec_moduleŠ   s”  € ØŒÐ*Ð*Ð*ØŒÔ%Ð1Ð1Ð1Ý�&”/Ô(Ñ)Ô)ˆØ”Ô!¥/Ô2ˆà13ˆÔ˜fœoÑ.õ Ô+Ð+ˆÝ! "Ñ%Ô%ˆ	Øð 	AÝ˜iÑ(Ô(ˆBØð AØ�Ø—’Ð?°IÐ?Ð?Ñ@Ô@Ð@à”W˜S˜b˜S”\¥HÑ,ˆ
Ø˜*Ñ$ˆõ �r˜3 ¤Ñ,Ô,ˆØˆ:Ø�KŠKÐ+ RÐ+Ð+Ñ,Ô,Ð,Ý+¨B°´Ñ<Ô<‰OˆK˜Øð .Ø$(�Ô!ð.Ý˜u b¨+°sÑ;Ô;Ð;à(-�DÔ%Ð%ø¨�DÔ%Ð-Ð-Ð-Ð-ð.ð �KŠKÐ>¸"Ð>Ð>Ñ?Ô?Ð?ÝˆR�”Ñ!Ô!Ð!Ð!Ð!s   ÄD( Ä(	D1rS   r   c                 óŽ  — | j         �Œ| j        s…d| _        | j         j        D ]q}t          |¦  «                             t
          j        ¦  «        }| j                             t
          j	         
                    |d         ¦  «        d         ¦  «         Œr|                     d¦  «        }|d         | j        v rdS t          |Ž                      d¦  «        }| j        D ]7}t
          j	                             |¦  «        r dS t          ||¦  «        r dS Œ8|                      ||¦  «        rdS |                     d|› �¦  «         dS )	a'  A fast way to get out of rewriting modules.

        Profiling has shown that the call to PathFinder.find_spec (inside of
        the find_spec from this class) is a major slowdown, so, this method
        tries to filter what we're sure won't be rewritten before getting to
        it.
        NTéÿÿÿÿr   r(   Fr%   z early skip of rewriting module: )r3   r:   Ú_initialpathsÚstrÚsplitrO   Úsepr8   Úaddr@   Úsplitextr   Úwith_suffixr1   Údirnamer   Ú_is_marked_for_rewriterH   )r;   r?   rS   Úinitial_pathÚpartsr@   Úpats          r$   rG   z-AssertionRewritingHook._early_rewrite_bailout´   sT  € ð Œ<Ð#¨DÔ,GÐ#Ø*.ˆDÔ'Ø $¤Ô :ð Uð U�õ ˜LÑ)Ô)×/Ò/µ´Ñ7Ô7�àÔ0×4Ò4µR´W×5EÒ5EÀeÈBÄiÑ5PÔ5PÐQRÔ5SÑTÔTÐTÐTð —
’
˜3‘”ˆØ�Œ9˜Ô8Ð8Ð8Ø�5õ ˜Ð×+Ò+¨EÑ2Ô2ˆà”;ð 	ð 	ˆCõ Œw�Š˜sÑ#Ô#ð Ø�u�uÝ˜#˜tÑ$Ô$ð Ø�u�uðð ×&Ò& t¨UÑ3Ô3ð 	Ø�5à�ŠÐ=°tÐ=Ð=Ñ>Ô>Ð>Øˆtr#   rU   c                 óÀ  — t           j                             |¦  «        dk    r|                     d|›�¦  «         dS | j        �A| j                             t          |¦  «        ¦  «        r|                     d|›�¦  «         dS t          |¦  «        }| j        D ]-}t          ||¦  «        r|                     d|›�¦  «          dS Œ.|  
                    ||¦  «        S )Nzconftest.pyzrewriting conftest file: Tz.matched test file (was specified on cmdline): zmatched test file )rO   r@   ÚbasenamerH   r3   Ú
isinitpathr   r   r1   r   rz   )r;   r?   rU   rS   Úfn_pathr}   s         r$   rQ   z&AssertionRewritingHook._should_rewriteÛ   sô   € åŒ7×Ò˜BÑÔ =Ò0Ð0Ø�KŠKÐ:°BÐ:Ð:Ñ;Ô;Ð;Ø�4àŒ<Ð#ØŒ|×&Ò&¥|°BÑ'7Ô'7Ñ8Ô8ð Ø—’ÐSÈRÐSÐSÑTÔTÐTØ�tõ ˜2‘,”,ˆØ”;ð 	ð 	ˆCÝ˜#˜wÑ'Ô'ð Ø—’Ð7°Ð7Ð7Ñ8Ô8Ð8Ø�t�tðð ×*Ò*¨4°Ñ7Ô7Ð7r#   c           	      óø   — 	 | j         |         S # t          $ r` | j        D ]J}||k    s|                     |dz   ¦  «        r*|                     d|›d|›d�¦  «         d| j         |<    Y dS ŒKd| j         |<   Y dS w xY w)Nr(   zmatched marked file z (from ú)TF)r9   ÚKeyErrorr6   Ú
startswithrH   )r;   r?   rS   Úmarkeds       r$   rz   z-AssertionRewritingHook._is_marked_for_rewriteð   s¶   € ð
	ØÔ1°$Ô7Ð7øÝð 	ð 	ð 	ØÔ,ð  ð  �Ø˜6’>�> T§_¢_°V¸c±\Ñ%BÔ%B�>Ø—K’KÐ Q°tÐ QÐ QÀfÐ QÐ QÐ QÑRÔRÐRØ;?�DÔ2°4Ñ8Ø˜4˜4˜4ð "ð
 49ˆDÔ*¨4Ñ0Ø�5�5ð	øøøs   ‚ �AA9Á*A9Á8A9Únamesc                 óÒ  — t          |¦  «                             t          j        ¦  «                             | j        ¦  «        }|D ]l}t          j        |         }t                               |j        pd¦  «        s7t          |j
        t          | ¦  «        ¦  «        s|                      |¦  «         Œm| j                             |¦  «         | j                             ¦   «          dS )zžMark import names as needing to be rewritten.

        The named module or package as well as any nested modules will
        be rewritten on import.
        Ú N)r5   Úintersectionr^   ÚmodulesÚ
differencer4   ÚAssertionRewriterÚis_rewrite_disabledÚ__doc__rK   Ú
__loader__ÚtypeÚ_warn_already_importedr6   Úupdater9   Úclear)r;   r‡   Úalready_importedr?   Úmods        r$   Úmark_rewritez#AssertionRewritingHook.mark_rewriteý   sÕ   € õ �‰JŒJ×#Ò#¥C¤KÑ0Ô0×;Ò;¸DÔ<QÑRÔRð 	ð %ð 	2ð 	2ˆDÝ”+˜dÔ#ˆCÝ$×8Ò8Ø”Ð!˜rñô ð 2å  ¤µ°d±´Ñ<Ô<ð2ð ×+Ò+¨DÑ1Ô1Ð1øØÔ×!Ò! %Ñ(Ô(Ð(ØÔ&×,Ò,Ñ.Ô.Ð.Ð.Ð.r#   c                 ób   — ddl m} | j                              |d|z  ¦  «        d¬¦  «         d S )Nr   ©ÚPytestAssertRewriteWarningz2Module already imported so cannot be rewritten: %sé   )Ú
stacklevel)Ú_pytest.warning_typesrš   r+   Úissue_config_time_warning)r;   r?   rš   s      r$   r’   z-AssertionRewritingHook._warn_already_imported  sZ   € ØDÐDÐDÐDÐDÐDàŒ×-Ò-Ø&Ð&ØDÀtÑKñô ð ð	 	.ñ 	
ô 	
ð 	
ð 	
ð 	
r#   Úpathnamec                 ó~   — t          |d¦  «        5 }|                     ¦   «         cddd¦  «         S # 1 swxY w Y   dS )zOptional PEP302 get_data API.ÚrbN)ÚopenÚread)r;   rŸ   Úfs      r$   Úget_datazAssertionRewritingHook.get_data  s~   € å�(˜DÑ!Ô!ð 	 QØ—6’6‘8”8ð	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ‘2²6¹6©é   é
   )r§   é   r   )ÚTraversableResourcesc                 óŽ   — t           j        dk     rddlm} nddlm}  |t          j        | j        |         ¬¦  «        ¦  «        S )N)r§   é   r   )Ú
FileReader)r@   )r^   Úversion_infoÚimportlib.readersr­   Úimportlib.resources.readersÚtypesÚSimpleNamespacer4   )r;   r?   r­   s      r$   Úget_resource_readerz*AssertionRewritingHook.get_resource_reader$  s]   € ÝÔ 'Ò)Ð)Ø8Ð8Ð8Ð8Ð8Ð8Ð8àBÐBÐBÐBÐBÐBà�:�eÔ3¸Ô9NÈtÔ9TÐUÑUÔUÑVÔVÐVr#   ©NN)$r   r    r!   r�   r   r<   r   r   r>   rL   rM   Ú
PathFinderrV   rI   rs   r   r   Úbytesr±   Ú
ModuleTypeÚ
ModuleSpecrY   ro   ÚboolrG   rQ   rz   r—   r’   r¥   r^   r®   Úimportlib.resources.abcrª   Úimportlib.abcr³   r"   r#   r$   r*   r*   C   s¦  € € € € € Ø;Ð;ð,˜vð ,¨$ð ,ð ,ð ,ð ,ð , 8¨GÔ#4ð ,¸ð ,ð ,ð ,ð ,ð
 Ô$Ô/Ô9€Jð
 7;Ø-1ð	&
ð &
àð&
ð �x  c¨5 jÔ 1Ô2Ô3ð&
ð ˜Ô)Ô*ð	&
ð
 
�)Ô%Ô0Ô	1ð&
ð &
ð &
ð &
ðPØÔ'Ô2ðà	�%Ô"Ô	#ðð ð ð ð
(" %Ô"2ð ("°tð ("ð ("ð ("ð ("ðT%¨3ð %Ð7Gð %ÈDð %ð %ð %ð %ðN8 Cð 8¨Sð 8Ð9Ið 8Èdð 8ð 8ð 8ð 8ð*¨3ð Ð7Gð ÈDð ð ð ð ð/ 3ð /¨4ð /ð /ð /ð /ð$
¨3ð 
°4ð 
ð 
ð 
ð 
ð  s¨E zÔ!2ð °uð ð ð ð ð
 Ô˜7Ò"Ð"ØÔ˜wÒ&Ð&ØDÐDÐDÐDÐDÐDÐDà:Ð:Ð:Ð:Ð:Ð:ð	W¨Cð 	WÐ4Hð 	Wð 	Wð 	Wð 	Wð 	Wð 	Wð #Ð"r#   r*   Úfprn   rm   r,   c                 ó^  — |                       t          j        j        ¦  «         d}|                       |¦  «         t	          |j        ¦  «        dz  }|j        dz  }|                       t          j        d||¦  «        ¦  «         |                       t          j
        |¦  «        ¦  «         d S )Nó       ì   ÿÿ z<LL)rh   rL   r   ÚMAGIC_NUMBERÚintÚst_mtimeÚst_sizeÚstructÚpackÚmarshalÚdumps)r¼   rn   rm   ÚflagsÚmtimeÚsizes         r$   Ú_write_pyc_fprË   -  s“   € ð ‡H‚H�YŒ^Ô(Ñ)Ô)Ð)à€EØ‡H‚HˆU�O„O€Oå�Ô$Ñ%Ô%¨
Ñ2€EØÔ Ñ+€Dà‡H‚H�VŒ[˜  tÑ,Ô,Ñ-Ô-Ð-Ø‡H‚H�WŒ]˜2ÑÔÑÔÐÐÐr#   rS   rl   c                 ó°  — |› dt          j        ¦   «         › �}	 t          |d¦  «        5 }t          |||¦  «         d d d ¦  «         n# 1 swxY w Y   n8# t          $ r+}|                      d|› d|j        › �¦  «         Y d }~dS d }~ww xY w	 t          j        ||¦  «         n3# t          $ r&}|                      d|› d|› �¦  «         Y d }~dS d }~ww xY wdS )Nr(   Úwbzerror writing pyc file at z: errno=Fz: T)rO   Úgetpidr¢   rË   ÚOSErrorrH   ÚerrnoÚreplace)rS   rm   rn   rl   Úproc_pycr¼   Úes          r$   re   re   ?  sZ  € ð Ð%Ð%�œ	™œÐ%Ð%€HðÝ�(˜DÑ!Ô!ð 	/ RÝ˜"˜k¨2Ñ.Ô.Ð.ð	/ð 	/ð 	/ñ 	/ô 	/ð 	/ð 	/ð 	/ð 	/ð 	/ð 	/øøøð 	/ð 	/ð 	/ð 	/øøåð ð ð Ø�ŠÐL°ÐLÐLÀ1Ä7ÐLÐLÑMÔMÐMØˆuˆuˆuˆuˆuøøøøðøøøðÝ
Œ
�8˜SÑ!Ô!Ð!Ð!øÝð ð ð Ø�ŠÐ;°Ð;Ð;¸Ð;Ð;Ñ<Ô<Ð<ð ˆuˆuˆuˆuˆuøøøøðøøøð ˆ4sQ   šA ªA¼A ÁAÁA ÁAÁA Á
B	Á BÂB	ÂB# Â#
CÂ-CÃCrU   r+   c                 óî   — t          j        | ¦  «        }|                      ¦   «         }t          | ¦  «        }t	          j        ||¬¦  «        }t          ||||¦  «         t          ||dd¬¦  «        }||fS )z1Read and rewrite *fn* and return the code object.)Úfilenamerf   T)Údont_inherit)rO   ÚstatÚ
read_bytesrs   ÚastÚparseÚrewrite_assertsÚcompile)rU   r+   r×   ÚsourceÚstrfnÚtreerm   s          r$   rd   rd   X  sn   € åŒ7�2‰;Œ;€DØ�]Š]‰_Œ_€FÝ�‰GŒG€EÝŒ9�V eÐ,Ñ,Ô,€DÝ�D˜& %¨Ñ0Ô0Ð0Ý	��u˜f°4Ð	8Ñ	8Ô	8€BØ�ˆ8€Or#   c                 ó   — d S rX   r"   )Úxs    r$   ú<lambda>râ   d  s   € Àd€ r#   rÝ   rH   c                 ó¼  — 	 t          |d¦  «        }n# t          $ r Y dS w xY w|5  	 t          j        | ¦  «        }t	          |j        ¦  «        }|j        }|                     d¦  «        }n4# t          $ r'} |d| › d|› �¦  «         Y d}~ddd¦  «         dS d}~ww xY wt          |¦  «        dk    r |d| z  ¦  «         	 ddd¦  «         dS |dd…         t          j
        j        k    r |d| z  ¦  «         	 ddd¦  «         dS |dd	…         d
k    r |d| z  ¦  «         	 ddd¦  «         dS |d	d…         }	t                               |	d¦  «        |dz  k    r |d| z  ¦  «         	 ddd¦  «         dS |dd…         }
t                               |
d¦  «        |dz  k    r |d| z  ¦  «         	 ddd¦  «         dS 	 t          j        |¦  «        }n4# t          $ r'} |d| › d|› �¦  «         Y d}~ddd¦  «         dS d}~ww xY wt!          |t"          j        ¦  «        s |d| z  ¦  «         	 ddd¦  «         dS |cddd¦  «         S # 1 swxY w Y   dS )zsPossibly read a pytest pyc containing rewritten code.

    Return rewritten code if successful or None if not.
    r¡   Né   z
_read_pyc(z): OSError z&_read_pyc(%s): invalid pyc (too short)é   z-_read_pyc(%s): invalid pyc (bad magic number)é   r¾   z._read_pyc(%s): invalid pyc (unsupported flags)r©   Úlittler¿   z_read_pyc(%s): out of datez+_read_pyc(%s): invalid pyc (incorrect size)z): marshal.load error z _read_pyc(%s): not a code object)r¢   rÏ   rO   r×   rÁ   rÂ   rÃ   r£   ÚlenrL   r   rÀ   Ú
from_bytesrÆ   ÚloadÚ	ExceptionrK   r±   ÚCodeType)rÝ   rl   rH   r¼   Ústat_resultrÉ   rÊ   ÚdatarÓ   Ú
mtime_dataÚ	size_datarm   s               r$   rc   rc   c  s  € ðÝ�#�t‰_Œ_ˆˆøÝð ð ð Øˆtˆtðøøøà	ð #ð #ð	Ýœ' &™/œ/ˆKÝ˜Ô,Ñ-Ô-ˆEØÔ&ˆDØ—7’7˜2‘;”;ˆDˆDøÝð 	ð 	ð 	ØˆEÐ5˜vÐ5Ð5°!Ð5Ð5Ñ6Ô6Ð6Ø�4�4�4ð#ð #ð #ñ #ô #ð #ð #ð #øøøøð	øøøõ ˆt‰9Œ9˜ÒÐØˆEÐ:¸VÑCÑDÔDÐDØð#ð #ð #ñ #ô #ð #ð #ð #ð ���Œ8•y”~Ô2Ò2Ð2ØˆEÐAÀFÑJÑKÔKÐKØð#ð #ð #ñ #ô #ð #ð #ð #ð  ��!�Œ9Ð+Ò+Ð+ØˆEÐBÀVÑKÑLÔLÐLØð%#ð #ð #ñ #ô #ð #ð #ð #ð& ˜!˜B˜$”Zˆ
Ý�>Š>˜* hÑ/Ô/°5¸:Ñ3EÒEÐEØˆEÐ.°Ñ7Ñ8Ô8Ð8Øð-#ð #ð #ñ #ô #ð #ð #ð #ð. ˜˜B˜”Kˆ	Ý�>Š>˜) XÑ.Ô.°$¸Ñ2CÒCÐCØˆEÐ?À&ÑHÑIÔIÐIØð5#ð #ð #ñ #ô #ð #ð #ð #ð6	Ý”˜bÑ!Ô!ˆBˆBøÝð 	ð 	ð 	ØˆEÐ@˜vÐ@Ð@¸QÐ@Ð@ÑAÔAÐAØ�4�4�4ð?#ð #ð #ñ #ô #ð #ð #ð #øøøøð:	øøøõ ˜"�eœnÑ-Ô-ð 	ØˆEÐ4°vÑ=Ñ>Ô>Ð>ØðE#ð #ð #ñ #ô #ð #ð #ð #ðF ðG#ð #ð #ð #ñ #ô #ð #ð #ð #ð #ð #ð #øøøð #ð #ð #ð #ð #ð #s�   ‚ “
! !¦I¨AA-Á,IÁ-
BÁ7BÂIÂBÂ%IÃ,IÄ	IÄ3;IÅ;;IÇGÇIÇ
H
Ç#HÇ4IÈH
È
,IÉIÉIÉIr–   Úmodule_pathc                 óN   — t          |||¦  «                             | ¦  «         dS )z%Rewrite the assert statements in mod.N)r�   Úrun)r–   rÝ   rñ   r+   s       r$   rÛ   rÛ   ”  s*   € õ �k 6¨6Ñ2Ô2×6Ò6°sÑ;Ô;Ð;Ð;Ð;r#   Úobjc                 ó~   — t          t          j        ¦  «        }t          | |¬¦  «                             dd¦  «        S )a§  Get a safe repr of an object for assertion error messages.

    The assertion formatting (util.format_explanation()) requires
    newlines to be escaped since they are a special character for it.
    Normally assertion.util.format_explanation() does this but for a
    custom repr it is possible to contain one of the special escape
    sequences, especially '\n{' and '\n}' are likely to be present in
    JSON reprs.
    ©Úmaxsizeú
ú\n)Ú_get_maxsize_for_safereprr   Ú_configr   rÑ   )rô   r÷   s     r$   Ú	_safereprrü   ž  s6   € õ (­¬Ñ5Ô5€GÝ�C Ð)Ñ)Ô)×1Ò1°$¸Ñ>Ô>Ð>r#   c                 óˆ   — | €d}n|                       t          j        ¦  «        }|dk    rdS |dk    r
t          dz  S t          S )zJGet `maxsize` configuration for saferepr based on the given config object.Nr   é   é   r¨   )Úget_verbosityr   ÚVERBOSITY_ASSERTIONSr   )r+   Ú	verbositys     r$   rú   rú   ¬  sL   € à€~Øˆ	ˆ	à×(Ò(­Ô)DÑEÔEˆ	Ø�A‚~€~ØˆtØ�A‚~€~Ý$ rÑ)Ð)Ý Ð r#   c                 ó¼   — ddg}t          | t          ¦  «        s$t          | ¦  «        } |                     d¦  «         |D ]\  }}|                      ||¦  «        } Œ| S )zñFormat the custom assertion message given.

    For strings this simply replaces newlines with '\n~' so that
    util.format_explanation() will preserve them instead of escaping
    newlines.  For other objects saferepr() is used first.
    )rø   ú
~)ú%ú%%)rù   r  )rK   rs   r   ÚappendrÑ   )rô   ÚreplacesÚr1Úr2s       r$   Ú_format_assertmsgr  ¹  sj   € ð ˜{Ð+€HÝ�c�3ÑÔð (Ý�s‰mŒmˆØ�Š˜Ñ'Ô'Ð'àð "ð "‰ˆˆBØ�kŠk˜"˜bÑ!Ô!ˆˆà€Jr#   c                 ój   — t          | ¦  «        rdS 	 t          | d¦  «         S # t          $ r Y dS w xY w)NFr   T)ÚcallableÚhasattrrë   )rô   s    r$   Ú_should_repr_global_namer  Ï  sO   € Ý��}„}ð ØˆuðÝ˜3 
Ñ+Ô+Ð+Ð+øÝð ð ð Øˆtˆtðøøøs   “$ ¤
2±2ÚexplanationsÚis_orc                 ól   — d|rdpd                      | ¦  «        z   dz   }|                     dd¦  «        S )Nú(z or z and rƒ   r  r  )ÚjoinrÑ   )r  r  Úexplanations      r$   Ú_format_boolopr  Ù  s?   € Ø˜Ð) 6Ð4¨W×:Ò:¸<ÑHÔHÑHÈ3ÑN€KØ×Ò˜s DÑ)Ô)Ð)r#   ÚopsÚresultsÚexplsÚeach_objc                 ó  — t          t          t          | ¦  «        ¦  «        ||¦  «        D ]!\  }}}	 | }n# t          $ r d}Y nw xY w|r nŒ"t          j        �/t	          j        | |         ||         ||dz            ¦  «        }|�|S |S )NTrÿ   )ÚzipÚrangerè   rë   r   Ú_reprcompare)	r  r  r  r  ÚiÚresÚexplÚdoneÚcustoms	            r$   Ú_call_reprcomparer$  Þ  s²   € õ �E¥# c¡(¤(™OœO¨W°eÑ<Ô<ð ð ‰ˆˆ3�ð	Ø�7ˆDˆDøÝð 	ð 	ð 	ØˆDˆDˆDð	øøøàð 	ØˆEð	åÔÐ$ÝÔ" 3 q¤6¨8°A¬;¸ÀÀQÁ¼ÑHÔHˆØÐØˆMØ€Ks   ³7·AÁAÚlinenoÚorigr!  c                 óN   — t           j        �t          j        | ||¦  «         d S d S rX   ©r   Ú_assertion_pass)r%  r&  r!  s      r$   Ú_call_assertion_passr*  ò  s.   € ÝÔÐ'ÝÔ˜V T¨4Ñ0Ô0Ð0Ð0Ð0ð (Ð'r#   c                  ó"   — t           j        rdndS )zŠCheck if any plugins implement the pytest_assertion_pass hook
    in order not to generate explanation unnecessarily (might be expensive).TFr(  r"   r#   r$   Ú_check_if_assertion_pass_implr,  ÷  s   € õ Ô'Ð2ˆ4ˆ4¨UÐ2r#   znot %sz~%sz-%sz+%sú|ú^ú&z<<z>>ú+ú-Ú*ú/z//r  z==z!=ú<z<=ú>z>=ú**Úiszis notÚinznot inú@Únodec              #   ój   K  — | V — t          j        | ¦  «        D ]}t          |¦  «        E d{V —† ŒdS )zARecursively yield node and all its children in depth-first order.N)rÙ   Úiter_child_nodesÚtraverse_node)r:  Úchilds     r$   r=  r=    sV   è è € à
€J€J€JÝÔ% dÑ+Ô+ð (ð (ˆÝ  Ñ'Ô'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'ð(ð (r#   rÿ   rö   Úsrcc                 óÚ  ‡
‡‡‡‡— i ŠdŠg ŠdŠ
t          ¦   «         Šdˆ
ˆˆˆˆfd„}t          j        t          j        | ¦  «        j        ¦  «        }|D �]–\  }}\  }}}}|t          j        k    r	|dk    r|Š
Œ%‰
��n|t          j        k    r
|dv r‰dz  Šn|t          j        k    r	|dv r‰dz  Š‰s3‰                     ||d…         ¦  «         ‰                     |¦  «         Œ�‰dk    rª|t          j        k    rš|d	k    r”|‰v rOt          ‰¦  «        dk    r<|t          ‰d
         ¦  «        z   t          |¦  «        z
  }	‰d
         d|	…         ‰d
<   n5|‰v r‰d
         d|…         ‰d
<   n‰                     |d|…         ¦  «          |¦   «          �Œ@|t          j
        t          j        hv r |¦   «          �Œf‰r.|‰vr*‰                     |¦  «         ‰                     |¦  «         �Œ˜‰S )z<Return a mapping from {lineno: "assertion test expression"}.r   Nr,   c                  ó²   •— ‰ €J ‚d                      ‰¦  «                             ¦   «                              d¦  «        ‰‰ <   dŠg Šd Š t          ¦   «         Šd S )Nr‰   ú\r   )r  Úrstripr5   )Úassert_linenoÚdepthÚlinesÚretÚ
seen_liness   €€€€€r$   Ú_write_and_resetz._get_assertion_exprs.<locals>._write_and_reset+  sY   ø€ àÐ(Ð(Ð(ØŸWšW U™^œ^×2Ò2Ñ4Ô4×;Ò;¸DÑAÔAˆˆMÑØˆØˆØˆÝ‘U”Uˆ
ˆ
ˆ
r#   Úassertz([{rÿ   z)]}ú,rq   ©r,   N)r5   ÚtokenizeÚioÚBytesIOÚreadlineÚNAMEÚOPr  rv   rè   ÚNEWLINEÚ	ENDMARKER)r?  rI  ÚtokensÚtprÝ   r%  ÚoffsetÚ_ÚlineÚoffset_in_trimmedrD  rE  rF  rG  rH  s             @@@@@r$   Ú_get_assertion_exprsr[  !  sS  øøøøø€ ð €Cà€EØ€EØ#'€MÝ™5œ5€Jðð ð ð ð ð ð ð ð ð õ Ô�rœz¨#™œÔ7Ñ8Ô8€FØ17ð 'ñ 'Ñ-ˆˆFÑ$�V˜V a¨Ø•”ÒÐ 6¨XÒ#5Ð#5Ø"ˆMˆMØÑ&à•X”[Ò Ð  V¨u _ _Ø˜‘
��Ø•x”{Ò"Ð" v°  Ø˜‘
�àð 'Ø—’˜T & ' 'œ]Ñ+Ô+Ð+Ø—’˜vÑ&Ô&Ð&Ð&à˜!’� ¥h¤kÒ 1Ð 1°fÀ²m°mà˜ZÐ'Ð'­C°©J¬J¸!ªO¨OØ(.µ°U¸2´Y±´Ñ(?Å#ÀdÁ)Ä)Ñ(KÐ%Ø % b¤	Ð*<Ð+<Ð*<Ô =�E˜"‘I�Ià˜zÐ)Ð)Ø % b¤	¨'¨6¨'Ô 2�E˜"‘I�Ið —L’L  g v g¤Ñ/Ô/Ð/Ø Ð Ñ"Ô"Ð"Ñ"Ø�Ô(­(Ô*<Ð=Ð=Ð=Ø Ð Ñ"Ô"Ð"Ñ"Øð '˜6¨Ð3Ð3Ø—’˜TÑ"Ô"Ð"Ø—’˜vÑ&Ô&Ð&ùà€Jr#   c                   óš  ‡ — e Zd ZdZdee         dee         deddfˆ fd„Zde	j
        ddfd	„Zed
edefd„¦   «         Zdefd„Zde	j        de	j        fd„Zde	j        de	j        fd„Zdede	j        de	j        fd„Zdede	j        fd„Zde	j        defd„Zd,d„Zde	j        de	j        fd„Zde	j        dee	j        ef         fd„Zde	j        dee	j                 fd„Z de	j!        dee	j!        ef         fd„Z"de	j        dee	j        ef         fd„Z#de	j$        dee	j        ef         fd„Z%d e	j&        dee	j        ef         fd!„Z'd"e	j(        dee	j        ef         fd#„Z)d$e	j*        dee	j        ef         fd%„Z+d&e	j,        dee	j,        ef         fd'„Z-d(e	j        dee	j        ef         fd)„Z.d*e	j/        dee	j        ef         fd+„Z0ˆ xZ1S )-r�   aÜ
  Assertion rewriting implementation.

    The main entrypoint is to call .run() with an ast.Module instance,
    this will then find all the assert statements and rewrite them to
    provide intermediate values and a detailed assertion error.  See
    http://pybites.blogspot.be/2011/07/behind-scenes-of-pytests-new-assertion.html
    for an overview of how this works.

    The entry point here is .run() which will iterate over all the
    statements in an ast.Module and for each ast.Assert statement it
    finds call .visit() with it.  Then .visit_Assert() takes over and
    is responsible for creating new ast statements to replace the
    original assert statement: it rewrites the test of an assertion
    to provide intermediate values and replace it with an if statement
    which raises an assertion error with a detailed explanation in
    case the expression is false and calls pytest_assertion_pass hook
    if expression is true.

    For this .visit_Assert() uses the visitor pattern to visit all the
    AST nodes of the ast.Assert.test field, each visit call returning
    an AST node and the corresponding explanation string.  During this
    state is kept in several instance attributes:

    :statements: All the AST statements which will replace the assert
       statement.

    :variables: This is populated by .variable() with each variable
       used by the statements so that they can all be set to None at
       the end of the statements.

    :variable_counter: Counter to create new unique variables needed
       by statements.  Variables are created using .variable() and
       have the form of "@py_assert0".

    :expl_stmts: The AST statements which will be executed to get
       data from the assertion.  This is the code which will construct
       the detailed assertion message that is used in the AssertionError
       or for the pytest_assertion_pass hook.

    :explanation_specifiers: A dict filled by .explanation_param()
       with %-formatting placeholders and their corresponding
       expressions to use in the building of an assertion message.
       This is used by .pop_format_context() to build a message.

    :stack: A stack of the explanation_specifiers dicts maintained by
       .push_format_context() and .pop_format_context() which allows
       to build another %-formatted string while already building one.

    :scope: A tuple containing the current scope used for variables_overwrite.

    :variables_overwrite: A dict filled with references to variables
       that change value within an assert. This happens when a variable is
       reassigned with the walrus operator

    This state, except the variables_overwrite,  is reset on every new assert
    statement visited and used by the other visitors.
    rñ   r+   rÝ   r,   Nc                 óú   •— t          ¦   «                              ¦   «          || _        || _        |�|                     d¦  «        | _        nd| _        || _        d| _        t          t          ¦  «        | _
        d S )NÚenable_assertion_pass_hookFr"   )Úsuperr<   rñ   r+   r0   r^  rÝ   Úscoper   ÚdictÚvariables_overwrite)r;   rñ   r+   rÝ   Ú	__class__s       €r$   r<   zAssertionRewriter.__init__“  s}   ø€ õ 	‰Œ×ÒÑÔÐØ&ˆÔØˆŒØÐØ.4¯mªmØ,ñ/ô /ˆDÔ+Ð+ð /4ˆDÔ+ØˆŒØ*,ˆŒ
å�ÑÔð 	Ô Ð Ð r#   r–   c                 óp  ‡— |j         sdS t          |dd¦  «        }|du }|�|                      |¦  «        rdS d}d}|j         D ]»}|rt          |t          j        ¦  «        ret          |j        t          j        ¦  «        rFt          |j        j        t          ¦  «        r'|j        j        }|                      |¦  «        r dS d}n3t          |t          j	        ¦  «        r|j
        dk    r|j        dk    rn n|dz  }Œ¼t          |t          j        ¦  «        r|j        r|j        d         j        Šn|j        Št          j        dk    r1t	          j        dd	‰d¬
¦  «        t	          j        dd‰d¬
¦  «        g}n*t	          j        dd	¦  «        t	          j        dd¦  «        g}ˆfd„|D ¦   «         }||j         ||…<   |f| _        |g}|�rè|                     ¦   «         }	t          |	t          j        t          j        t          j        f¦  «        r8t-          g | j        ¢|	‘R ¦  «        | _        |                     t0          ¦  «         |	t0          k    r| j        dd…         | _        Œ t          |	t          j        ¦  «        sJ ‚t	          j        |	¦  «        D �]\  }
}t          |t6          ¦  «        r°g }t9          |¦  «        D ]Œ\  }}t          |t          j        ¦  «        r)|                     |                      |¦  «        ¦  «         ŒH|                     |¦  «         t          |t          j        ¦  «        r|                     |¦  «         Œ�tA          |	|
|¦  «         ŒËt          |t          j        ¦  «        r/t          |t          j!        ¦  «        s|                     |¦  «         �Œ|�°ædS dS )z5Find all assert statements in *mod* and rewrite them.NÚ	docstringr   FÚ
__future__rÿ   r¦   Úbuiltinsú@py_builtins©r%  Ú
col_offsetz_pytest.assertion.rewriteú
@pytest_arc                 ó@   •— g | ]}t          j        |g‰d ¬¦  «        ‘ŒS )r   ri  )rÙ   ÚImport)Ú.0Úaliasr%  s     €r$   ú
<listcomp>z)AssertionRewriter.run.<locals>.<listcomp>Ý  s9   ø€ ð 
ð 
ð 
ØAF�CŒJ˜�w v¸!Ð<Ñ<Ô<ð
ð 
ð 
r#   rq   )"ÚbodyÚgetattrrŽ   rK   rÙ   ÚExprÚvalueÚConstantrs   Ú
ImportFromÚlevelrZ   ÚFunctionDefÚdecorator_listr%  r^   r®   ro  r`  ÚpopÚAsyncFunctionDefÚClassDefÚtupler  Ú_SCOPE_END_MARKERÚASTÚiter_fieldsÚlistÚ	enumerateÚAssertÚextendÚvisitÚsetattrÚexpr)r;   r–   ÚdocÚexpect_docstringÚposÚitemÚaliasesÚimportsÚnodesr:  r?   ÚfieldÚnewr  r>  r%  s                  @r$   ró   zAssertionRewriter.run¥  sí  ø€ àŒxð 	àˆFõ �c˜;¨Ñ-Ô-ˆØ $˜;ÐØˆ?˜t×7Ò7¸Ñ<Ô<ˆ?ØˆFØˆØˆØ”Hð 	ð 	ˆDà ðå˜t¥S¤XÑ.Ô.ðõ ˜tœz­3¬<Ñ8Ô8ðõ ˜tœzÔ/µÑ5Ô5ð	ð ”jÔ&�Ø×+Ò+¨CÑ0Ô0ð Ø�F�FØ#(Ð Ð å˜4¥¤Ñ0Ô0ðà”J !’O�OØ”K <Ò/Ð/àà�Ø�1‰HˆCˆCõ �d�CœOÑ,Ô,ð 	!°Ô1Dð 	!ØÔ(¨Ô+Ô2ˆFˆFà”[ˆFåÔ˜wÒ&Ð&å”	˜* n¸VÐPQÐRÑRÔRÝ”	Ø/Ø Ø!Ø ð	ñ ô ðˆGˆGõ ”	˜* nÑ5Ô5Ý”	Ð5°|ÑDÔDðˆGð
ð 
ð 
ð 
ØJQð
ñ 
ô 
ˆð $ˆŒ��S�Ñð �VˆŒ
Ø14°ˆØñ 	(Ø—9’9‘;”;ˆDÝ˜$¥¤µ#Ô2FÍÌÐ UÑVÔVð 0Ý"Ð#6 T¤ZÐ#6°Ð#6Ð#6Ñ7Ô7�”
Ø—’Õ.Ñ/Ô/Ð/ØÕ(Ò(Ð(Ø!œZ¨¨¨œ_�”
ØÝ˜d¥C¤GÑ,Ô,Ð,Ð,Ð,Ý"œ¨tÑ4Ô4ð (ñ (‘��eÝ˜e¥TÑ*Ô*ð (Ø)+�CÝ$-¨eÑ$4Ô$4ð 4ð 4™˜˜5Ý% e­S¬ZÑ8Ô8ð 4àŸJšJ t§z¢z°%Ñ'8Ô'8Ñ9Ô9Ð9Ð9àŸJšJ uÑ-Ô-Ð-Ý)¨%µ´Ñ9Ô9ð 4Ø %§¢¨UÑ 3Ô 3Ð 3øÝ˜D $¨Ñ,Ô,Ð,Ð,å˜u¥c¤gÑ.Ô.ð(õ ' u­c¬hÑ7Ô7ð	(ð —L’L Ñ'Ô'Ð'ùð7 ñ 	(ð 	(ð 	(ð 	(ð 	(r#   re  c                 ó
   — d| v S )NÚPYTEST_DONT_REWRITEr"   )re  s    r$   rŽ   z%AssertionRewriter.is_rewrite_disabled  s   € à$¨	Ð1Ð1r#   c                 ó‚   — dt          t          | j        ¦  «        ¦  «        z   }| j                             |¦  «         |S )zGet a new variable.z
@py_assert)rs   ÚnextÚvariable_counterÚ	variablesr  )r;   r?   s     r$   ÚvariablezAssertionRewriter.variable  s<   € ð �c¥$ tÔ'<Ñ"=Ô"=Ñ>Ô>Ñ>ˆØŒ×Ò˜dÑ#Ô#Ð#Øˆr#   r‡  c           	      ó  — |                       ¦   «         }| j                             t          j        t          j        |t          j        ¦   «         ¦  «        g|¦  «        ¦  «         t          j        |t          j        ¦   «         ¦  «        S )zGive *expr* a name.)r—  Ú
statementsr  rÙ   ÚAssignÚNameÚStoreÚLoad)r;   r‡  r?   s      r$   ÚassignzAssertionRewriter.assign  s^   € à�}Š}‰ŒˆØŒ×Ò�sœz­3¬8°D½#¼)¹+¼+Ñ+FÔ+FÐ*GÈÑNÔNÑOÔOÐOÝŒx˜�cœh™jœjÑ)Ô)Ð)r#   c                 ó.   — |                       d|¦  «        S )z Call saferepr on the expression.rü   )Úhelper)r;   r‡  s     r$   ÚdisplayzAssertionRewriter.display  s   € à�{Š{˜;¨Ñ-Ô-Ð-r#   r?   Úargsc                 óâ   — t          j        dt          j        ¦   «         ¦  «        }t          j        ||t          j        ¦   «         ¦  «        }t          j        |t          |¦  «        g ¦  «        S )zCall a helper in this module.rk  )rÙ   r›  r�  Ú	AttributeÚCallr�  )r;   r?   r¢  Úpy_nameÚattrs        r$   r   zAssertionRewriter.helper  sL   € å”(˜<­¬©¬Ñ4Ô4ˆÝŒ}˜W d­C¬H©J¬JÑ7Ô7ˆÝŒx˜�d 4™jœj¨"Ñ-Ô-Ð-r#   c                 óœ   — t          j        dt          j        ¦   «         ¦  «        }t          j        ||t          j        ¦   «         ¦  «        S )z!Return the builtin called *name*.rh  )rÙ   r›  r�  r¤  )r;   r?   Úbuiltin_names      r$   ÚbuiltinzAssertionRewriter.builtin  s3   € å”x µ´±
´
Ñ;Ô;ˆÝŒ}˜\¨4µ´±´Ñ<Ô<Ð<r#   c                 ón   — dt          t          | j        ¦  «        ¦  «        z   }|| j        |<   d|z   dz   S )aJ  Return a new named %-formatting placeholder for expr.

        This creates a %-formatting placeholder for expr in the
        current formatting context, e.g. ``%(py0)s``.  The placeholder
        and expr are placed in the current format context so that it
        can be used on the next call to .pop_format_context().
        Úpyz%(z)s)rs   r”  r•  Úexplanation_specifiers)r;   r‡  Ú	specifiers      r$   Úexplanation_paramz#AssertionRewriter.explanation_param"  s>   € ð �3�t DÔ$9Ñ:Ô:Ñ;Ô;Ñ;ˆ	Ø15ˆÔ# IÑ.Ø�iÑ $Ñ&Ð&r#   c                 óR   — i | _         | j                             | j         ¦  «         dS )aŒ  Create a new formatting context.

        The format context is used for when an explanation wants to
        have a variable value formatted in the assertion message.  In
        this case the value required can be added using
        .explanation_param().  Finally .pop_format_context() is used
        to format a string of %-formatted values as added by
        .explanation_param().
        N)r­  Ústackr  )r;   s    r$   Úpush_format_contextz%AssertionRewriter.push_format_context.  s+   € ð <>ˆÔ#ØŒ
×Ò˜$Ô5Ñ6Ô6Ð6Ð6Ð6r#   Ú	expl_exprc           	      óÒ  — | j                              ¦   «         }| j         r| j         d         | _        d„ |                     ¦   «         D ¦   «         }t	          j        |t          |                     ¦   «         ¦  «        ¦  «        }t	          j        |t	          j	        ¦   «         |¦  «        }dt          t          | j        ¦  «        ¦  «        z   }| j        r| j                             |¦  «         | j                             t	          j        t	          j        |t	          j        ¦   «         ¦  «        g|¦  «        ¦  «         t	          j        |t	          j        ¦   «         ¦  «        S )aZ  Format the %-formatted string with current format context.

        The expl_expr should be an str ast.expr instance constructed from
        the %-placeholders created by .explanation_param().  This will
        add the required code to format said string to .expl_stmts and
        return the ast.Name instance of the formatted string.
        rq   c                 ó6   — g | ]}t          j        |¦  «        ‘ŒS r"   )rÙ   ru  )rn  Úkeys     r$   rp  z8AssertionRewriter.pop_format_context.<locals>.<listcomp>F  s"   € Ð<Ð<Ð< c•”˜SÑ!Ô!Ð<Ð<Ð<r#   z
@py_format)r±  rz  r­  ÚkeysrÙ   r   r�  ÚvaluesÚBinOpÚModrs   r”  r•  r^  Úformat_variablesr  Ú
expl_stmtsrš  r›  rœ  r�  )r;   r³  Úcurrentr·  Úformat_dictÚformr?   s          r$   Úpop_format_contextz$AssertionRewriter.pop_format_context;  s  € ð ”*—.’.Ñ"Ô"ˆØŒ:ð 	9Ø*.¬*°R¬.ˆDÔ'Ø<Ð<¨W¯\ª\©^¬^Ð<Ñ<Ô<ˆÝ”h˜t¥T¨'¯.ª.Ñ*:Ô*:Ñ%;Ô%;Ñ<Ô<ˆÝŒy˜¥C¤G¡I¤I¨{Ñ;Ô;ˆØ�c¥$ tÔ'<Ñ"=Ô"=Ñ>Ô>Ñ>ˆØÔ*ð 	/ØÔ!×(Ò(¨Ñ.Ô.Ð.ØŒ×Ò�sœz­3¬8°D½#¼)¹+¼+Ñ+FÔ+FÐ*GÈÑNÔNÑOÔOÐOÝŒx˜�cœh™jœjÑ)Ô)Ð)r#   r:  c                 ó¸   — t          |t          j        ¦  «        sJ ‚|                      |¦  «        }||                      |                      |¦  «        ¦  «        fS )z1Handle expressions we don't have custom code for.)rK   rÙ   r‡  rž  r¯  r¡  )r;   r:  r   s      r$   Úgeneric_visitzAssertionRewriter.generic_visitO  sP   € å˜$¥¤Ñ)Ô)Ð)Ð)Ð)Ø�kŠk˜$ÑÔˆØ�D×*Ò*¨4¯<ª<¸Ñ+<Ô+<Ñ=Ô=Ð=Ð=r#   Úassert_c           	      ó$  — t          |j        t          j        ¦  «        r\t	          |j        j        ¦  «        dk    r?ddl}ddlm} | j	        €J ‚| 
                     |d¦  «        d| j	        |j        ¬¦  «         g | _        g | _        t          j        ¦   «         | _        | j        rg | _        g | _        g | _        |                      ¦   «          |                      |j        ¦  «        \  }}t          j        t          j        ¦   «         |¦  «        }| j        �r£|                      t          j        |¦  «        ¦  «        }|j        r|                      d|j        ¦  «        }d}	nt          j        d	¦  «        }d
}	t          j        t          j        |	¦  «        t          j        ¦   «         |¦  «        }
t          j        |t          j        ¦   «         |
¦  «        }t          j        dt          j         ¦   «         ¦  «        }|                      d|¦  «        }t          j!        ||gg ¦  «        }t          j"        |d¦  «        }g }| #                    | j        ¦  «         | $                    |¦  «         |                      d|¦  «        }tK          | j&        ¦  «        |j                 }t          j'        |                      dt          j        |j        ¦  «        t          j        |¦  «        |¦  «        ¦  «        }t          j(        |                      d¦  «        g | j        ¢|‘g ¦  «        }|g}t          j(        |||¦  «        }| j         $                    |¦  «         | j        rRd„ | j        D ¦   «         }t          j)        |t          j        d¦  «        ¦  «        }| j         $                    |¦  «         �nA| j        }| j         $                    t          j(        ||g ¦  «        ¦  «         |j        r!|                      d|j        ¦  «        }d|z   }nt          j        d	¦  «        }d
|z   }t          j        |t          j        ¦   «         t          j        |¦  «        ¦  «        }|                      |¦  «        }|                      d|¦  «        }t          j        dt          j         ¦   «         ¦  «        }t          j!        ||gg ¦  «        }t          j"        |d¦  «        }| $                    |¦  «         | j        rRd„ | j        D ¦   «         }t          j)        |t          j        d¦  «        ¦  «        }| j         $                    |¦  «         | j        D ])}tU          |¦  «        D ]}t          j+        ||¦  «         ŒŒ*| j        S )a.  Return the AST statements to replace the ast.Assert instance.

        This rewrites the test of an assertion to provide
        intermediate values and replace it with an if statement which
        raises an assertion error with a detailed explanation in case
        the expression is false.
        rÿ   r   Nr™   z5assertion is always true, perhaps remove parentheses?)ÚcategoryrÕ   r%  r  z	
>assert r‰   zassert ÚAssertionErrorÚ_format_explanationr*  r,  c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r"   ©rÙ   r›  rœ  ©rn  r?   s     r$   rp  z2AssertionRewriter.visit_Assert.<locals>.<listcomp>§  s7   € ð ð ð Ø48•C”H˜T¥3¤9¡;¤;Ñ/Ô/ðð ð r#   c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r"   rÉ  rÊ  s     r$   rp  z2AssertionRewriter.visit_Assert.<locals>.<listcomp>Â  s*   € ÐPÐPÐP¸�œ $­¬	©¬Ñ4Ô4ÐPÐPÐPr#   ),rK   ÚtestrÙ   r   rè   ÚeltsÚwarningsr�   rš   rñ   Úwarn_explicitr%  r™  r–  Ú	itertoolsÚcountr•  r^  r»  r±  r¼  r²  r…  ÚUnaryOpÚNotrÀ  ru  Úmsgr   r¹  ÚAddr›  r�  r¥  ÚRaiser„  r  r[  rÝ   rs  ÚIfrš  r=  Úcopy_location)r;   rÃ  rÎ  rš   Útop_conditionr  ÚnegationrÔ  Ú	assertmsgÚgluestrÚerr_explanationÚerr_msgÚerr_nameÚfmtÚexcÚraise_Ústatements_failÚfmt_passr&  Úhook_call_passÚhook_impl_testÚstatements_passÚ	main_testr–  Úclear_formatrq  Útemplater”   Ústmtr:  s                                 r$   Úvisit_AssertzAssertionRewriter.visit_AssertU  s%  € õ �g”l¥C¤IÑ.Ô.ð 	µ3°w´|Ô7HÑ3IÔ3IÈQÒ3NÐ3NØˆOˆOˆOàHÐHÐHÐHÐHÐHð Ô#Ð/Ð/Ð/Ø×"Ò"Ø*Ð*ØKñô ð ØÔ)Ø”~ð #ñ ô ð ð +-ˆŒØ$&ˆŒÝ )¤Ñ 1Ô 1ˆÔàÔ*ð 	2Ø/1ˆDÔ!à02ˆŒ
Ø*,ˆŒØ× Ò Ñ"Ô"Ð"à%)§Z¢Z°´Ñ%=Ô%=Ñ"ˆ�{å”;�sœw™yœy¨-Ñ8Ô8ˆàÔ*ñ B	 Ø×)Ò)­#¬,°{Ñ*CÔ*CÑDÔDˆCð Œ{ð $Ø ŸKšKÐ(;¸W¼[ÑIÔI�	Ø&��åœL¨Ñ,Ô,�	Ø#�Ý!œi­¬°WÑ(=Ô(=½s¼w¹y¼yÈ#ÑNÔNˆOÝ”i 	­3¬7©9¬9°oÑFÔFˆGÝ”xÐ 0µ#´(±*´*Ñ=Ô=ˆHØ—+’+Ð3°WÑ=Ô=ˆCÝ”(˜8 c U¨BÑ/Ô/ˆCÝ”Y˜s DÑ)Ô)ˆFØ ˆOØ×"Ò" 4¤?Ñ3Ô3Ð3Ø×"Ò" 6Ñ*Ô*Ð*ð —{’{Ð#8¸#Ñ>Ô>ˆHÝ'¨¬Ñ4Ô4°W´^ÔDˆDÝ œXØ—’Ø*Ý”L ¤Ñ0Ô0Ý”L Ñ&Ô&Øñ	ô ñô ˆNõ !œVØ—’Ð;Ñ<Ô<Ø2�$”/Ð2 >Ð2Øñô ˆNð
  .Ð.ˆOõ œ˜x¨¸/ÑJÔJˆIØŒO×"Ò" 9Ñ-Ô-Ð-ØÔ$ð 5ðð Ø<@Ô<Qðñ ô �	õ  #œz¨)µS´\À$Ñ5GÔ5GÑHÔH�Ø”×&Ò& |Ñ4Ô4Ð4ùð ”?ˆDØŒO×"Ò"¥3¤6¨(°D¸"Ñ#=Ô#=Ñ>Ô>Ð>ØŒ{ð 6Ø ŸKšKÐ(;¸W¼[ÑIÔI�	Ø*¨[Ñ8��åœL¨Ñ,Ô,�	Ø'¨+Ñ5�Ý”y ­C¬G©I¬Iµs´|ÀKÑ7PÔ7PÑQÔQˆHØ×)Ò)¨(Ñ3Ô3ˆCØ—+’+Ð3°SÑ9Ô9ˆCÝ”xÐ 0µ#´(±*´*Ñ=Ô=ˆHÝ”(˜8 c U¨BÑ/Ô/ˆCÝ”Y˜s DÑ)Ô)ˆFà�KŠK˜ÑÔÐð Œ>ð 	*ØPÐPÀÄÐPÑPÔPˆIÝ”J˜y­#¬,°tÑ*<Ô*<Ñ=Ô=ˆEØŒO×"Ò" 5Ñ)Ô)Ð)à”Oð 	1ð 	1ˆDÝ% dÑ+Ô+ð 1ð 1�ÝÔ! $¨Ñ0Ô0Ð0Ð0ð1àŒÐr#   c                 ó  — t          j        |                      d¦  «        g g ¦  «        }|j        j        }t          j        t          j        |¦  «        t          j        ¦   «         g|g¦  «        }|                      d|¦  «        }t          j	        t          j
        ¦   «         ||g¦  «        }t          j        ||                      |¦  «        t          j        |¦  «        ¦  «        }||                      |¦  «        fS ©NÚlocalsr  )rÙ   r¥  rª  rA   ÚidÚCompareru  ÚInr   ÚBoolOpÚOrÚIfExpr¡  r¯  )r;   r?   ÚlocsÚ	target_idÚinlocsÚdoreprrÌ  r‡  s           r$   Úvisit_NamedExprz!AssertionRewriter.visit_NamedExprË  sÅ   € õ Œx˜Ÿš XÑ.Ô.°°BÑ7Ô7ˆØ”K”Nˆ	Ý”�Sœ\¨)Ñ4Ô4µs´v±x´x°jÀ4À&ÑIÔIˆØ—’Ð7¸Ñ>Ô>ˆÝŒz�#œ&™(œ( V¨VÐ$4Ñ5Ô5ˆÝŒy˜˜tŸ|š|¨DÑ1Ô1µ3´<À	Ñ3JÔ3JÑKÔKˆØ�T×+Ò+¨DÑ1Ô1Ð1Ð1r#   c                 óþ  — t          j        |                      d¦  «        g g ¦  «        }t          j        t          j        |j        ¦  «        t          j        ¦   «         g|g¦  «        }|                      d|¦  «        }t          j        t          j	        ¦   «         ||g¦  «        }t          j
        ||                      |¦  «        t          j        |j        ¦  «        ¦  «        }||                      |¦  «        fS rî  )rÙ   r¥  rª  rñ  ru  rð  rò  r   ró  rô  rõ  r¡  r¯  )r;   r?   rö  rø  rù  rÌ  r‡  s          r$   Ú
visit_NamezAssertionRewriter.visit_Name×  sÀ   € õ Œx˜Ÿš XÑ.Ô.°°BÑ7Ô7ˆÝ”�Sœ\¨$¬'Ñ2Ô2µS´V±X´X°JÀÀÑGÔGˆØ—’Ð7¸Ñ>Ô>ˆÝŒz�#œ&™(œ( V¨VÐ$4Ñ5Ô5ˆÝŒy˜˜tŸ|š|¨DÑ1Ô1µ3´<ÀÄÑ3HÔ3HÑIÔIˆØ�T×+Ò+¨DÑ1Ô1Ð1Ð1r#   Úboolopc           
      ój  — |                       ¦   «         }|                      t          j        g t          j        ¦   «         ¦  «        ¦  «        }t          j        |dt          j        ¦   «         ¦  «        }t          t          |j        t          j	        ¦  «        ¦  «        }| j
        x}}| j        }t          |j        ¦  «        dz
  }	|                      ¦   «          t          |j        ¦  «        D �]<\  }
}|
règ }| j                             t          j        ||g ¦  «        ¦  «         || _        t          |t          j        ¦  «        r—t          |j        t          j        ¦  «        rx|j        j        j        d„ |j        d |
…         D ¦   «         v rN|                       ¦   «         }|j        | j        | j                 |j        j        j        <   ||j        j        _        |                      ¦   «          |                      |¦  «        \  }}|                     t          j        t          j        |t          j        ¦   «         ¦  «        g|¦  «        ¦  «         |                      t          j        |¦  «        ¦  «        }t          j        ||gg ¦  «        }| j                             t          j         |¦  «        ¦  «         |
|	k     rc|}|r&t          j!        t          j"        ¦   «         |¦  «        }g }| j
                             t          j        ||g ¦  «        ¦  «         |x| _
        }�Œ>|| _
        || _        |  #                    d|t          j        |¦  «        ¦  «        }|                      |¦  «        }t          j        |t          j        ¦   «         ¦  «        |  $                    |¦  «        fS )Nr  rÿ   c                 ó<   — g | ]}t          |d ¦  «        ¯|j        ‘ŒS )rð  )r  rð  )rn  Úast_exprs     r$   rp  z2AssertionRewriter.visit_BoolOp.<locals>.<listcomp>ö  s:   € ð ð ð à$Ý" 8¨TÑ2Ô2ðØ œðð ð r#   r  )%r—  rž  rÙ   r   r�  r¤  rÁ   rK   Úoprô  r™  r¼  rè   r¸  r²  r‚  r  r×  rñ  ÚleftÚ	NamedExprrA   rð  rb  r`  r…  rš  r›  rœ  rÀ  ru  r¥  rs  rÒ  rÓ  r   r¯  )r;   rý  Úres_varÚ	expl_listÚappr  rq  ÚsaveÚ	fail_saveÚlevelsr  ÚvÚ
fail_innerÚcondÚpytest_tempr   r!  Úexpl_formatÚcallÚinnerÚexpl_templates                        r$   Úvisit_BoolOpzAssertionRewriter.visit_BoolOpá  s  € Ø—-’-‘/”/ˆØ—K’K¥¤¨­S¬X©Z¬ZÑ 8Ô 8Ñ9Ô9ˆ	ÝŒm˜I xµ´±´Ñ<Ô<ˆÝ•J˜vœy­#¬&Ñ1Ô1Ñ2Ô2ˆØ”oÐ%ˆˆtØ”Oˆ	Ý�V”]Ñ#Ô# aÑ'ˆØ× Ò Ñ"Ô"Ð"å˜fœmÑ,Ô,ð  	/ñ  	/‰DˆAˆqØð 3Ø-/�
à”×&Ò&¥s¤v¨d°JÀÑ'CÔ'CÑDÔDÐDØ",�”õ ˜q¥#¤+Ñ.Ô.ð3å" 1¤6­3¬=Ñ9Ô9ð3ð œœÔ(ðð à(.¬°b°q°bÔ(9ðñ ô ðð ð #'§-¢-¡/¤/�KØMNÌV�DÔ,¨T¬ZÔ8¸¼¼Ô9IÑJØ'2�A”F”MÔ$Ø×$Ò$Ñ&Ô&Ð&ØŸ
š
 1™œ‰IˆC�Ø�KŠK�œ
¥C¤H¨Wµc´i±k´kÑ$BÔ$BÐ#CÀSÑIÔIÑJÔJÐJØ×1Ò1µ#´,¸tÑ2DÔ2DÑEÔEˆKÝ”8˜C + °Ñ3Ô3ˆDØŒO×"Ò"¥3¤8¨D¡>¤>Ñ2Ô2Ð2Ø�6ŠzˆzØ!$�Øð 8Ýœ;¥s¤w¡y¤y°$Ñ7Ô7�DØ(*�Ø”×&Ò&¥s¤v¨d°E¸2Ñ'>Ô'>Ñ?Ô?Ð?Ø).Ð.�” $ùØˆŒØ#ˆŒØŸšÐ$4°iÅÄÈeÑATÔATÑUÔUˆØ×&Ò& }Ñ5Ô5ˆÝŒx˜¥¤¡¤Ñ,Ô,¨d×.DÒ.DÀTÑ.JÔ.JÐJÐJr#   Úunaryc                 óÔ   — t           |j        j                 }|                      |j        ¦  «        \  }}|                      t          j        |j        |¦  «        ¦  «        }|||fz  fS rX   )Ú	UNARY_MAPr  rc  r…  Úoperandrž  rÙ   rÒ  )r;   r  ÚpatternÚoperand_resÚoperand_explr   s         r$   Úvisit_UnaryOpzAssertionRewriter.visit_UnaryOp  sZ   € Ý˜EœHÔ.Ô/ˆØ$(§J¢J¨u¬}Ñ$=Ô$=Ñ!ˆ�\Ø�kŠk�#œ+ e¤h°Ñ<Ô<Ñ=Ô=ˆØ�G˜|˜oÑ-Ð-Ð-r#   Úbinopc                 ó   — t           |j        j                 }|                      |j        ¦  «        \  }}|                      |j        ¦  «        \  }}d|› d|› d|› d�}|                      t          j        ||j        |¦  «        ¦  «        }||fS )Nr  ú rƒ   )	Ú	BINOP_MAPr  rc  r…  r  Úrightrž  rÙ   r¹  )	r;   r  ÚsymbolÚ	left_exprÚ	left_explÚ
right_exprÚ
right_explr  r   s	            r$   Úvisit_BinOpzAssertionRewriter.visit_BinOp  s�   € Ý˜5œ8Ô-Ô.ˆØ#Ÿzšz¨%¬*Ñ5Ô5Ñˆ	�9Ø!%§¢¨E¬KÑ!8Ô!8Ñˆ
�JØ<˜)Ð<Ð< fÐ<Ð<¨zÐ<Ð<Ð<ˆØ�kŠk�#œ) I¨u¬x¸ÑDÔDÑEÔEˆØ�KÐÐr#   r  c                 ó¾  — |                       |j        ¦  «        \  }}g }g }g }|j        D ]¢}t          |t          j        ¦  «        rD|j        | j                             | j	        i ¦  «        v r| j        | j	                 |j                 }|                       |¦  «        \  }}	| 
                    |	¦  «         | 
                    |¦  «         Œ£|j        D ]þ}
t          |
j        t          j        ¦  «        rS|
j        j        | j                             | j	        i ¦  «        v r'| j        | j	                 |
j        j                 |
_        |                       |
j        ¦  «        \  }}	| 
                    t	          j        |
j        |¦  «        ¦  «         |
j        r!| 
                    |
j        dz   |	z   ¦  «         Œæ| 
                    d|	z   ¦  «         Œÿd                     |d                     |¦  «        ¦  «        }	t	          j        |||¦  «        }|                      |¦  «        }|                      |                      |¦  «        ¦  «        }|› d|› d|	› d�}||fS )Nú=r6  z{}({})z, z
{z = z
})r…  Úfuncr¢  rK   rÙ   r›  rð  rb  Úgetr`  r  Úkeywordsrt  ÚkeywordÚargÚformatr  r¥  rž  r¯  r¡  )r;   r  Únew_funcÚ	func_explÚ	arg_explsÚnew_argsÚ
new_kwargsr,  r   r!  r+  Únew_callÚres_explÚ
outer_expls                 r$   Ú
visit_CallzAssertionRewriter.visit_Call   sE  € Ø"Ÿjšj¨¬Ñ3Ô3Ñˆ�)Øˆ	ØˆØˆ
Ø”9ð 	!ð 	!ˆCÝ˜#�sœxÑ(Ô(ð C¨S¬V°tÔ7O×7SÒ7SØ”
˜Bñ8ô 8ð .ð .ð Ô.¨t¬zÔ:¸3¼6ÔB�ØŸ
š
 3™œ‰IˆC�Ø×Ò˜TÑ"Ô"Ð"Ø�OŠO˜CÑ Ô Ð Ð Ø”}ð 
	.ð 
	.ˆGÝØ”�sœxñô ð Wà”-Ô" dÔ&>×&BÒ&BÀ4Ä:ÈrÑ&RÔ&RÐRÐRØ $Ô 8¸¼Ô DÀWÄ]ÔEUÔ V�”ØŸ
š
 7¤=Ñ1Ô1‰IˆC�Ø×Ò�cœk¨'¬+°sÑ;Ô;Ñ<Ô<Ð<ØŒ{ð .Ø× Ò  ¤¨sÑ!2°TÑ!9Ñ:Ô:Ð:Ð:à× Ò  ¨¡Ñ-Ô-Ð-Ð-à�Š˜y¨$¯)ª)°IÑ*>Ô*>Ñ?Ô?ˆÝ”8˜H h°
Ñ;Ô;ˆØ�kŠk˜(Ñ#Ô#ˆØ×)Ò)¨$¯,ª,°sÑ*;Ô*;Ñ<Ô<ˆØ Ð=Ð= hÐ=Ð=°4Ð=Ð=Ð=ˆ
Ø�JˆÐr#   Ústarredc                 ó~   — |                       |j        ¦  «        \  }}t          j        ||j        ¦  «        }|d|z   fS )Nr2  )r…  rt  rÙ   ÚStarredÚctx)r;   r7  r   r!  Únew_starreds        r$   Úvisit_StarredzAssertionRewriter.visit_Starred@  s;   € à—J’J˜wœ}Ñ-Ô-‰	ˆˆTÝ”k # w¤{Ñ3Ô3ˆØ˜C $™JÐ&Ð&r#   r§  c                 óš  — t          |j        t          j        ¦  «        s|                      |¦  «        S |                      |j        ¦  «        \  }}|                      t          j        ||j	        t          j        ¦   «         ¦  «        ¦  «        }|  
                    |                      |¦  «        ¦  «        }d}|||||j	        fz  }||fS )Nz%s
{%s = %s.%s
})rK   r:  rÙ   r�  rÂ  r…  rt  rž  r¤  r§  r¯  r¡  )r;   r§  rt  Ú
value_explr   r4  r}   r!  s           r$   Úvisit_Attributez!AssertionRewriter.visit_AttributeF  s®   € Ý˜$œ(¥C¤HÑ-Ô-ð 	,Ø×%Ò% dÑ+Ô+Ð+Ø ŸJšJ t¤zÑ2Ô2ÑˆˆzØ�kŠk�#œ-¨¨t¬y½#¼(¹*¼*ÑEÔEÑFÔFˆØ×)Ò)¨$¯,ª,°sÑ*;Ô*;Ñ<Ô<ˆØ"ˆØ�h ¨*°d´iÐ@Ñ@ˆØ�DˆyÐr#   Úcompc                 óº  ‡ — ‰                       ¦   «          t          |j        t          j        ¦  «        rS|j        j        ‰ j                             ‰ j        i ¦  «        v r'‰ j        ‰ j                 |j        j                 |_        t          |j        t          j	        ¦  «        r)|j        ‰ j        ‰ j                 |j        j
        j        <   ‰                      |j        ¦  «        \  }}t          |j        t          j        t          j        f¦  «        rd|› d�}ˆ fd„t          t          |j        ¦  «        ¦  «        D ¦   «         }d„ |D ¦   «         }d„ |D ¦   «         }t#          t          t          |j        ¦  «        ¦  «        |j        |j        ¦  «        }g }g }	|g}
|D �]›\  }}}t          |t          j	        ¦  «        rgt          |t          j        ¦  «        rM|j
        j        |j        k    r8‰                      ¦   «         |j
        _        |‰ j        ‰ j                 |j        <   ‰                      |¦  «        \  }}t          |t          j        t          j        f¦  «        rd|› d�}|
                     |¦  «         t*          |j                 }|	                     t          j        |¦  «        ¦  «         |› d|› d|› �}|                     t          j        |¦  «        ¦  «         t          j        ||g|g¦  «        }‰ j                             t          j        ||         g|¦  «        ¦  «         ||}}�Œ�‰                      dt          j        |	t          j        ¦   «         ¦  «        t          j        |t          j        ¦   «         ¦  «        t          j        |t          j        ¦   «         ¦  «        t          j        |
t          j        ¦   «         ¦  «        ¦  «        }t          |j        ¦  «        dk    r't          j        t          j        ¦   «         |¦  «        }n|d	         }|‰                      ‰                      |¦  «        ¦  «        fS )
Nr  rƒ   c                 ó8   •— g | ]}‰                      ¦   «         ‘ŒS r"   )r—  )rn  r  r;   s     €r$   rp  z3AssertionRewriter.visit_Compare.<locals>.<listcomp>\  s!   ø€ ÐGÐGÐG¨Q˜Ÿš™œÐGÐGÐGr#   c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r"   )rÙ   r›  r�  ©rn  r
  s     r$   rp  z3AssertionRewriter.visit_Compare.<locals>.<listcomp>]  s*   € ÐEÐEÐE°!•c”h˜q¥#¤(¡*¤*Ñ-Ô-ÐEÐEÐEr#   c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r"   rÉ  rD  s     r$   rp  z3AssertionRewriter.visit_Compare.<locals>.<listcomp>^  s*   € ÐGÐGÐG°A•s”x ¥3¤9¡;¤;Ñ/Ô/ÐGÐGÐGr#   r  r$  rÿ   r   ) r²  rK   r  rÙ   r›  rð  rb  r)  r`  r  rA   r…  rñ  ró  r  rè   r  r  Úcomparatorsr—  r  r  rc  ru  r™  rš  r   r   r�  ÚAndr¯  rÀ  )r;   r@  Úleft_resr"  Úres_variablesÚ
load_namesÚstore_namesÚitr  Úsymsr  r  r  Únext_operandÚnext_resÚ	next_explÚsymr!  Úres_exprÚ	expl_callr   s   `                    r$   Úvisit_ComparezAssertionRewriter.visit_CompareP  s²  ø€ Ø× Ò Ñ"Ô"Ð"åØŒI•s”xñ
ô 
ð 	KàŒiŒl˜dÔ6×:Ò:¸4¼:ÀrÑJÔJÐJÐJØÔ0°´Ô<¸T¼Y¼\ÔJˆDŒIÝ�d”i¥¤Ñ/Ô/ð 	RØHLÌ	ˆDÔ$ T¤ZÔ0°´Ô1AÔ1DÑEØ"Ÿjšj¨¬Ñ3Ô3Ñˆ�)Ý�d”i¥#¤+­s¬zÐ!:Ñ;Ô;ð 	)Ø(˜IÐ(Ð(Ð(ˆIØGÐGÐGÐGµ%½¸D¼H¹¼Ñ2FÔ2FÐGÑGÔGˆØEÐE°}ÐEÑEÔEˆ
ØGÐG¸ÐGÑGÔGˆÝ••s˜4œ8‘}”}Ñ%Ô% t¤x°Ô1AÑBÔBˆØˆØˆØ�*ˆØ#%ð 	6ñ 	6ÑˆAˆr�<å˜<­¬Ñ7Ô7ðQå˜x­¬Ñ2Ô2ðQð !Ô'Ô*¨h¬kÒ9Ð9à)-¯ª©¬�Ô#Ô&ØDP�Ô(¨¬Ô4°X´[ÑAØ"&§*¢*¨\Ñ":Ô":ÑˆH�iÝ˜,­¬µc´jÐ(AÑBÔBð -Ø, 	Ð,Ð,Ð,�	Ø�NŠN˜8Ñ$Ô$Ð$Ý˜BœLÔ)ˆCØ�KŠK�œ SÑ)Ô)Ñ*Ô*Ð*ØÐ3Ð3 #Ð3Ð3¨	Ð3Ð3ˆDØ�LŠL�œ dÑ+Ô+Ñ,Ô,Ð,Ý”{ 8¨b¨T°H°:Ñ>Ô>ˆHØŒO×"Ò"¥3¤:¨{¸1¬~Ð.>ÀÑ#IÔ#IÑJÔJÐJØ"*¨I�iˆH‰Hà—K’KØÝŒI�d�CœH™JœJÑ'Ô'ÝŒI�j¥#¤(¡*¤*Ñ-Ô-ÝŒI�e�SœX™ZœZÑ(Ô(ÝŒI�g�sœx™zœzÑ*Ô*ñ
ô 
ˆ	õ ˆtŒx‰=Œ=˜1ÒÐÝœJ¥s¤w¡y¤y°*Ñ=Ô=ˆCˆCà˜Q”-ˆCà�D×*Ò*¨4×+BÒ+BÀ9Ñ+MÔ+MÑNÔNÐNÐNr#   rL  )2r   r    r!   r�   r   rs   r   r¶   r<   rÙ   ÚModuleró   Ústaticmethodr¹   rŽ   r—  r‡  r›  rž  r¡  r   r¤  rª  r¯  r²  rÀ  r  r   rÂ  rƒ  r   rë  rì  r  rú  rü  ró  r  rÒ  r  r¹  r%  r¥  r6  r9  r<  r?  rñ  rT  Ú__classcell__)rc  s   @r$   r�   r�   X  sû  ø€ € € € € ð8ð 8ðt
Ø# Cœ=ð
Ø2:¸6Ô2Bð
ØLQð
à	ð
ð 
ð 
ð 
ð 
ð 
ð$[(�s”zð [( dð [(ð [(ð [(ð [(ðz ð2 sð 2¨tð 2ð 2ð 2ñ „\ð2ð˜#ð ð ð ð ð*˜3œ8ð *¨¬ð *ð *ð *ð *ð.˜CœHð .¨¬ð .ð .ð .ð .ð.˜3ð . s¤xð .°C´Hð .ð .ð .ð .ð=˜Cð = C¤Mð =ð =ð =ð =ð

' c¤hð 
'°3ð 
'ð 
'ð 
'ð 
'ð7ð 7ð 7ð 7ð*¨C¬Hð *¸¼ð *ð *ð *ð *ð(> #¤'ð >¨e°C´H¸c°MÔ.Bð >ð >ð >ð >ðt C¤Jð t°4¸¼´>ð tð tð tð tðl
2 C¤Mð 
2°e¸C¼MÈ3Ð<NÔ6Oð 
2ð 
2ð 
2ð 
2ð2˜sœxð 2¨E°#´(¸C°-Ô,@ð 2ð 2ð 2ð 2ð/K 3¤:ð /K°%¸¼À#¸Ô2Fð /Kð /Kð /Kð /Kðb. 3¤;ð .°5¸¼À3¸Ô3Gð .ð .ð .ð .ð  ¤ð  ¨u°S´X¸s°]Ô/Cð  ð  ð  ð  ð˜sœxð ¨E°#´(¸C°-Ô,@ð ð ð ð ð@' S¤[ð '°U¸3¼;ÈÐ;KÔ5Lð 'ð 'ð 'ð 'ð C¤Mð °e¸C¼HÀc¸MÔ6Jð ð ð ð ð3O #¤+ð 3O°%¸¼À#¸Ô2Fð 3Oð 3Oð 3Oð 3Oð 3Oð 3Oð 3Oð 3Or#   r�   ri   c                 óÜ   — 	 t          j        | d¬¦  «         nS# t          t          t          f$ r Y dS t
          $ r Y dS t          $ r!}|j        t          j        k    rY d}~dS ‚ d}~ww xY wdS )z~Attempt to create the given directory and sub-directories exist.

    Returns True if successful or if it already exists.
    T)Úexist_okFN)	rO   ÚmakedirsÚFileNotFoundErrorÚNotADirectoryErrorÚFileExistsErrorÚPermissionErrorrÏ   rÐ   ÚEROFS)ri   rÓ   s     r$   ra   ra   †  s    € ð
Ý
Œ�I¨Ð-Ñ-Ô-Ð-Ð-øÝÕ1µ?ÐCð ð ð ð ˆuˆuÝð ð ð ØˆuˆuÝð ð ð àŒ7•e”kÒ!Ð!Ø�5�5�5�5�5Øøøøøð	øøøð
 ˆ4s%   ‚ ™A)³	A)¿	A)ÁA$Á#A$Á$A)Ú	file_pathc                 óŽ   — t           j        r0t          t           j        ¦  «        t          | j        dd…         Ž z  S | j        dz  S )zKReturn the cache directory to write .pyc files for the given .py file path.rÿ   rq   Ú__pycache__)r^   Úpycache_prefixr   r|   Úparent)r`  s    r$   r`   r`   œ  sE   € å
Ôð 	0õ •CÔ&Ñ'Ô'­$°	´ÀÀ"ÀÔ0EÐ*FÑFÐFð Ô -Ñ/Ð/r#   r´   )|r�   rÙ   Úcollectionsr   rÐ   Ú	functoolsr»   rL   Úimportlib.machineryÚimportlib.utilrN  rÐ  rÆ   rO   Úpathlibr   r   rÄ   r^   rM  r±   Útypingr   r   r   r	   r
   r   r   r   r   r   r   r   Ú_pytest._io.safereprr   r   Ú_pytest._versionr   Ú_pytest.assertionr   Ú_pytest.configr   Ú_pytest.mainr   Ú_pytest.pathlibr   r   Ú_pytest.stashr   Ú_pytest.assertion.utilr   rÇ  r   r   rF   ÚimplementationÚ	cache_tagÚ
PYTEST_TAGÚPYC_EXTrb   r~  ÚabcÚMetaPathFinderÚLoaderr*   r¶   rí   rì   rË   r¹   re   rd   rs   rc   rU  rÛ   Úobjectrü   rÁ   rú   r  r  r  r$  r*  r,  rÓ  ÚInvertÚUSubÚUAddr  ÚBitOrÚBitXorÚBitAndÚLShiftÚRShiftrÕ  ÚSubÚMultÚDivÚFloorDivrº  ÚEqÚNotEqÚLtÚLtEÚGtÚGtEÚPowÚIsÚIsNotrò  ÚNotInÚMatMultr  r  r=  Ú	lru_cacher[  ÚNodeVisitorr�   ra   r`   r"   r#   r$   ú<module>r”     sL  ðØ ;Ð ;à 
€
€
€
Ø #Ð #Ð #Ð #Ð #Ð #Ø €€€Ø Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ø €€€Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø €€€Ø 
€
€
€
Ø €€€Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð à 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø )Ð )Ð )Ð )Ð )Ð )Ø $Ð $Ð $Ð $Ð $Ð $Ø "Ð "Ð "Ð "Ð "Ð "Ø !Ð !Ð !Ð !Ð !Ð !Ø  Ð  Ð  Ð  Ð  Ð  Ø (Ð (Ð (Ð (Ð (Ð (Ø &Ð &Ð &Ð &Ð &Ð &Ø "Ð "Ð "Ð "Ð "Ð "ð MÐ LÐ LÐ LÐ LÐ Lð ð 1Ø0Ð0Ð0Ð0Ð0Ð0ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð -�(Ð+Ô,Ñ.Ô.€ð Ô"Ô,Ð?Ð?°gÐ?Ð?€
Ø
 Ð+¨Ñ
,€Ø�Ñ˜gÑ%€ð �H‘J”JÐ ðgWð gWð gWð gWð gW˜Yœ]Ô9¸9¼=Ô;Oñ gWô gWð gWðT Ø
ˆ5Œ	ð Ø "¤ð Ø49´Nð à	ð ð  ð  ð  ð$ØðàŒðð ”ðð 
ð	ð
 
ðð ð ð ð2�dð  Fð ¨u°R´^ÀUÄ^Ð5SÔ/Tð ð ð ð ð =K¸Nð.ð .Øð.Øð.Ø$,¨c¨U°D¨[Ô$9ð.àˆeŒnÔð.ð .ð .ð .ðh "&Ø#ð	<ð <Ø	Œð<àð<ð ˜#”ð<ð �VÔð	<ð
 
ð<ð <ð <ð <ð?�6ð ?˜cð ?ð ?ð ?ð ?ð
! h¨vÔ&6ð 
!¸8ÀC¼=ð 
!ð 
!ð 
!ð 
!ð˜6ð  cð ð ð ð ð, &ð ¨Tð ð ð ð ð* ¨#¤ð *°tð *Àð *ð *ð *ð *ð
Ø	�#Œðà�dŒ^ðð �CŒ=ðð �vÔð	ð
 	ðð ð ð ð(1 ð 1¨Cð 1°sð 1¸tð 1ð 1ð 1ð 1ð
3 tð 3ð 3ð 3ð 3ð ŒW�h ¤
¨E°3´8¸UÀCÄHÈeÐT€	ðØ„Iˆsðà„J�ðð „J�ðð „J�ð	ð
 „J�ðð „GˆSðð „GˆSðð „Hˆcðð „GˆSðð „L�$ðð „GˆTðð „FˆDðð „Iˆtðð „FˆCðð „GˆTðð  „FˆCð!ð" „GˆTð#ð$ „GˆTØ„FˆDØ„IˆxØ„FˆDØ„IˆxØ„K�ð/ð €	ð6(˜œð ( H¨S¬WÔ$5ð (ð (ð (ð (ð €Ô˜QÐÑÔð3˜eð 3¨¨S°#¨X¬ð 3ð 3ð 3ñ  Ôð3ðlkOð kOð kOð kOð kO˜œñ kOô kOð kOð\˜Dð  Tð ð ð ð ð,0˜Tð 0 dð 0ð 0ð 0ð 0ð 0ð 0r#   