§
    öyIf%  ã                   óÄ   — 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gZ ed	¦  «        Z ed
¦  «        Z	 G d„ dee         ¦  «        Z
 G d„ d¦  «        ZdS )é    )ÚAny)Úcast)ÚDict)ÚGeneric)ÚTypeVar)ÚUnionÚStashÚStashKeyÚTÚDc                   ó   — e Zd ZdZdZdS )r
   zï``StashKey`` is an object used as a key to a :class:`Stash`.

    A ``StashKey`` is associated with the type ``T`` of the value of the key.

    A ``StashKey`` is unique and cannot conflict with another key.

    .. versionadded:: 7.0
    © N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   ó    úA/var/www/piapp/venv/lib/python3.11/site-packages/_pytest/stash.pyr
   r
      s   € € € € € ðð ð €I€I€Ir   c                   óî   — e Zd ZdZdZdd„Zdee         deddfd„Zdee         defd	„Z	dee         d
e
deee
f         fd„Zdee         d
edefd„Zdee         ddfd„Zdee         defd„Zdefd„ZdS )r	   aJ  ``Stash`` is a type-safe heterogeneous mutable mapping that
    allows keys and value types to be defined separately from
    where it (the ``Stash``) is created.

    Usually you will be given an object which has a ``Stash``, for example
    :class:`~pytest.Config` or a :class:`~_pytest.nodes.Node`:

    .. code-block:: python

        stash: Stash = some_object.stash

    If a module or plugin wants to store data in this ``Stash``, it creates
    :class:`StashKey`\s for its keys (at the module level):

    .. code-block:: python

        # At the top-level of the module
        some_str_key = StashKey[str]()
        some_bool_key = StashKey[bool]()

    To store information:

    .. code-block:: python

        # Value type must match the key.
        stash[some_str_key] = "value"
        stash[some_bool_key] = True

    To retrieve the information:

    .. code-block:: python

        # The static type of some_str is str.
        some_str = stash[some_str_key]
        # The static type of some_bool is bool.
        some_bool = stash[some_bool_key]

    .. versionadded:: 7.0
    ©Ú_storageÚreturnNc                 ó   — i | _         d S )Nr   ©Úselfs    r   Ú__init__zStash.__init__H   s   € Ø57ˆŒˆˆr   ÚkeyÚvaluec                 ó   — || j         |<   dS )zSet a value for key.Nr   )r   r   r   s      r   Ú__setitem__zStash.__setitem__K   s   € à"ˆŒ�cÑÐÐr   c                 óB   — t          t          | j        |         ¦  «        S )zZGet the value for key.

        Raises ``KeyError`` if the key wasn't set before.
        )r   r   r   ©r   r   s     r   Ú__getitem__zStash.__getitem__O   s   € õ
 •A�t”} SÔ)Ñ*Ô*Ð*r   Údefaultc                 ó8   — 	 | |         S # t           $ r |cY S w xY w)zNGet the value for key, or return default if the key wasn't set
        before.©ÚKeyError©r   r   r%   s      r   Úgetz	Stash.getV   s5   € ð	Ø˜”9ÐøÝð 	ð 	ð 	ØˆNˆNˆNð	øøøs   ‚
 Š˜c                 óB   — 	 | |         S # t           $ r
 || |<   |cY S w xY w)zmReturn the value of key if already set, otherwise set the value
        of key to default and return default.r'   r)   s      r   Ú
setdefaultzStash.setdefault^   s>   € ð	Ø˜”9ÐøÝð 	ð 	ð 	ØˆD�‰IØˆNˆNˆNð	øøøs   ‚
 Š�c                 ó   — | j         |= dS )z]Delete the value for key.

        Raises ``KeyError`` if the key wasn't set before.
        Nr   r#   s     r   Ú__delitem__zStash.__delitem__g   s   € ð
 ŒM˜#ÐÐÐr   c                 ó   — || j         v S )zReturn whether key was set.r   r#   s     r   Ú__contains__zStash.__contains__n   s   € à�d”mÐ#Ð#r   c                 ó*   — t          | j        ¦  «        S )z)Return how many items exist in the stash.)Úlenr   r   s    r   Ú__len__zStash.__len__r   s   € å�4”=Ñ!Ô!Ð!r   )r   N)r   r   r   r   r   r   r
   r   r!   r$   r   r   r*   r,   r.   Úboolr0   Úintr3   r   r   r   r	   r	      sV  € € € € € ð&ð &ðP €Ið8ð 8ð 8ð 8ð#˜x¨œ{ð #°1ð #¸ð #ð #ð #ð #ð+˜x¨œ{ð +¨qð +ð +ð +ð +ð�x ”{ð ¨Qð °5¸¸A¸´;ð ð ð ð ð˜h qœkð °Að ¸!ð ð ð ð ð˜x¨œ{ð ¨tð ð ð ð ð$ ¨¤ð $°ð $ð $ð $ð $ð"˜ð "ð "ð "ð "ð "ð "r   N)Útypingr   r   r   r   r   r   Ú__all__r   r   r
   r	   r   r   r   ú<module>r8      s  ðØ Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ð �JÐ
€ð €GˆC�L„L€Ø€GˆC�L„L€ð
ð 
ð 
ð 
ð 
ˆw�qŒzñ 
ô 
ð 
ðW"ð W"ð W"ð W"ð W"ñ W"ô W"ð W"ð W"ð W"r   