§
    øyIf~  ã                  ól   — d Z ddlmZ ddlZddlmZ ddlmZmZm	Z	 erddl
mZ  G d„ d¦  «        Zd	ZdS )
zÙ
Declare and handle the tox env info file (a file at the root of every tox environment that contains information about
the status of the tox environment - python version of the environment, installed packages, etc.).
é    )ÚannotationsN)Úcontextmanager)ÚTYPE_CHECKINGÚAnyÚIterator)ÚPathc                  óN   — e Zd ZdZdd„Zdd„Ze	 ddd„¦   «         Zdd„Zdd„Z	d	S )ÚInfoz*Stores metadata about the tox environment.Úpathr   ÚreturnÚNonec                ó´   — |dz  | _         	 t          j        | j                              ¦   «         ¦  «        }n# t          t
          f$ r i }Y nw xY w|| _        d S )Nz.tox-info.json)Ú_pathÚjsonÚloadsÚ	read_textÚ
ValueErrorÚOSErrorÚ_content)Úselfr   Úvalues      úD/var/www/piapp/venv/lib/python3.11/site-packages/tox/tox_env/info.pyÚ__init__zInfo.__init__   sg   € ØÐ,Ñ,ˆŒ
ð	Ý”J˜tœz×3Ò3Ñ5Ô5Ñ6Ô6ˆEˆEøÝ�GÐ$ð 	ð 	ð 	ØˆEˆEˆEð	øøøàˆŒˆˆs   Œ+8 ¸AÁAÚstrc                ó0   — | j         j        › d| j        › d�S )Nz(path=ú))Ú	__class__Ú__name__r   ©r   s    r   Ú__repr__zInfo.__repr__   s    € Ø”.Ô)Ð>Ð>°´Ð>Ð>Ð>Ð>ó    Nr   r   ÚsectionÚsub_sectionú
str | Noneú!Iterator[tuple[bool, Any | None]]c              #  óH  K  — | j                              |¦  «        }|�|�|                     |¦  «        }||k    rd|fV — dS d|fV — |€|| j         |<   n7| j                              |¦  «        €||i| j         |<   n|| j         |         |<   |                      ¦   «          dS )aZ  
        Compare new information with the existing one and update if differs.

        :param value: the value stored
        :param section: the primary key of the information
        :param sub_section: the secondary key of the information
        :return: a tuple where the first value is if it differs and the second is the old value
        NTF)r   ÚgetÚ_write)r   r   r"   r#   Úolds        r   ÚcomparezInfo.compare   sÃ   è è € ð Œm×Ò Ñ(Ô(ˆØÐ" s Ø—'’'˜+Ñ&Ô&ˆCà�%Š<ˆ<Ø˜�)ˆOˆOˆOˆOˆOà˜�*ÐÐÐàÐ"Ø).�”˜gÑ&Ð&Ø”×"Ò" 7Ñ+Ô+Ð3Ø*5°uÐ)=�”˜gÑ&Ð&à6;�”˜gÔ& {Ñ3Ø�KŠK‰MŒMˆMˆMˆMr!   c                ó   — i | _         d S ©N)r   r   s    r   Úresetz
Info.reset>   s   € ØˆŒˆˆr!   c                ó®   — | j         j                             dd¬¦  «         | j                              t	          j        | j        d¬¦  «        ¦  «         d S )NT)ÚparentsÚexist_oké   )Úindent)r   ÚparentÚmkdirÚ
write_textr   Údumpsr   r   s    r   r(   zInfo._writeA   sM   € ØŒ
Ô×Ò¨°tÐÑ<Ô<Ð<ØŒ
×Ò�dœj¨¬¸qÐAÑAÔAÑBÔBÐBÐBÐBr!   )r   r   r   r   )r   r   r,   )r   r   r"   r   r#   r$   r   r%   )r   r   )
r   Ú
__module__Ú__qualname__Ú__doc__r   r    r   r*   r-   r(   © r!   r   r
   r
      sš   € € € € € Ø4Ð4ðð ð ð ð?ð ?ð ?ð ?ð ð
 #'ð	ð ð ð ñ „^ðð>ð ð ð ðCð Cð Cð Cð Cð Cr!   r
   )r
   )r9   Ú
__future__r   r   Ú
contextlibr   Útypingr   r   r   Úpathlibr   r
   Ú__all__r:   r!   r   ú<module>r@      s²   ððð ð
 #Ð "Ð "Ð "Ð "Ð "à €€€Ø %Ð %Ð %Ð %Ð %Ð %Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /àð ØÐÐÐÐÐð3Cð 3Cð 3Cð 3Cð 3Cñ 3Cô 3Cð 3Cðl €€€r!   