§
    Ètºfë  ã                   ó    —  G d „ d¦  «        Z dS )c                   óB   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZeZd„ Z	d
d„Z
d	„ ZdS )ÚMonkeyPatcherzn
    Cover up attributes with new objects. Neat for monkey-patching things for
    unit-testing purposes.
    c                 ó@   — g | _         g | _        |D ]} | j        |Ž  Œd S ©N)Ú_patchesToApplyÚ
_originalsÚaddPatch)ÚselfÚpatchesÚpatchs      úT/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/python/monkey.pyÚ__init__zMonkeyPatcher.__init__   s>   € à!ˆÔð ˆŒØð 	"ð 	"ˆEØˆDŒM˜5Ð!Ð!Ð!ð	"ð 	"ó    c                 ó@   — | j                              |||f¦  «         dS )zæ
        Add a patch so that the attribute C{name} on C{obj} will be assigned to
        C{value} when C{patch} is called or during C{runWithPatches}.

        You can restore the original values with a call to restore().
        N)r   Úappend©r	   ÚobjÚnameÚvalues       r   r   zMonkeyPatcher.addPatch   s(   € ð 	Ô×#Ò# S¨$°Ð$6Ñ7Ô7Ð7Ð7Ð7r   c                 ó<   — | j         D ]\  }}}||f||fk    r dS ŒdS )zc
        Has the C{name} attribute of C{obj} already been patched by this
        patcher?
        TF)r   )r	   r   r   ÚoÚnÚvs         r   Ú_alreadyPatchedzMonkeyPatcher._alreadyPatched   s?   € ð
 ”ð 	ð 	‰GˆAˆq�!Ø�1ˆv˜#˜t˜Ò$Ð$Ø�t�tð %àˆur   c           	      óÆ   — | j         D ]X\  }}}|                      ||¦  «        s+| j                             ||t	          ||¦  «        f¦  «         t          |||¦  «         ŒYdS )z†
        Apply all of the patches that have been specified with L{addPatch}.
        Reverse this operation using L{restore}.
        N)r   r   r   r   ÚgetattrÚsetattrr   s       r   r   zMonkeyPatcher.patch)   s|   € ð
 !%Ô 4ð 	&ð 	&ÑˆC��uØ×'Ò'¨¨TÑ2Ô2ð HØ”×&Ò&¨¨Tµ7¸3ÀÑ3EÔ3EÐ'FÑGÔGÐGÝ�C˜˜uÑ%Ô%Ð%Ð%ð	&ð 	&r   c                 ó‚   — | j         r7| j                              ¦   «         \  }}}t          |||¦  «         | j         °5dS dS )zE
        Restore all original values to any patched objects.
        N)r   Úpopr   r   s       r   ÚrestorezMonkeyPatcher.restore5   sZ   € ð Œoð 	&Ø#œ×2Ò2Ñ4Ô4ÑˆC��uÝ�C˜˜uÑ%Ô%Ð%ð Œoð 	&ð 	&ð 	&ð 	&ð 	&r   Nc                 ó.   — |                       ¦   «          d S r   )r   )r	   ÚexcTypeÚexcValueÚexcTracebacks       r   Ú__exit__zMonkeyPatcher.__exit__=   s   € Ø�Š‰Œˆˆˆr   c                 ó–   — |                       ¦   «          	  ||i |¤Ž|                      ¦   «          S # |                      ¦   «          w xY w)z“
        Apply each patch already specified. Then run the function f with the
        given args and kwargs. Restore everything when done.
        )r   r   )r	   ÚfÚargsÚkws       r   ÚrunWithPatcheszMonkeyPatcher.runWithPatches@   sF   € ð
 	�
Š
‰Œˆð	Ø�1�d�>˜b�>�>à�LŠL‰NŒNˆNˆNøˆD�LŠL‰NŒNˆNˆNøøøs	   –2 ²A)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Ú	__enter__r   r$   r)   © r   r   r   r      s“   € € € € € ðð ð
"ð "ð "ð8ð 8ð 8ðð ð ð&ð &ð &ð €Ið&ð &ð &ðð ð ð ð	ð 	ð 	ð 	ð 	r   r   N)r   r/   r   r   ú<module>r0      sA   ððBð Bð Bð Bð Bñ Bô Bð Bð Bð Br   